draw | R Documentation |
Draw on a plot (map) to get a SpatVector or SpatExtent object for later use. After calling the function, start clicking on the map. When you are done, press ESC
. You can also preset the maximum number of clicks.
Note that for many installations this does to work well on the default RStudio plotting device. To work around that, you can first run dev.new(noRStudioGD = TRUE)
which will create a separate window for plotting, then use plot()
followed by draw()
and clicking on the map. It may also help to set your RStudio "Tools/Global Options/Appearance/Zoom" to 100
## S4 method for signature 'character'
draw(x="extent", col="red", lwd=2, id=FALSE, n=1000, xpd=TRUE, ...)
x |
character. The type of object to draw. One of "extent", "polygon", "line", or "points" |
col |
the color to be used |
lwd |
the width of the lines to be drawn |
id |
logical. If |
n |
the maximum number of clicks (does not apply when |
xpd |
logical. If |
... |
additional graphics arguments for drawing |
SpatVector or SpatExtent
click
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.