Draw an extent with two clicks

draw_extent(show = TRUE, ...)

Arguments

show

the drawn extent

...

arguments pass to graphics::rect()

Value

an extent, numeric vector of xmin,xmax,ymin,ymax

Examples

if (interactive()) {
plot(1)
draw_extent(show = TRUE)  ## click twice on the plot
}