expose mar for plot.sensebox(), fixes #12

pull/17/head
Norwin 6 years ago
parent 84dfc3226a
commit 8f70a242d0
Signed by: norwin
GPG Key ID: 24BC059DE24C43A3

@ -1,5 +1,5 @@
#' @export
plot.sensebox = function (x, ...) {
plot.sensebox = function (x, ..., mar = c(2,2,1,1)) {
if (
!requireNamespace("sf", quietly = TRUE) ||
!requireNamespace("maps", quietly = TRUE) ||
@ -21,7 +21,7 @@ plot.sensebox = function (x, ...) {
sf::st_geometry()
oldpar = par()
par(mar = c(2,2,1,1))
par(mar = mar)
plot(world, col = 'gray', xlim = bbox[c(1,3)], ylim = bbox[c(2,4)], axes = T)
plot(geom, add = T, col = x$exposure)
legend('left', legend = levels(x$exposure), col = 1:length(x$exposure), pch = 1)

Loading…
Cancel
Save