Learn R Programming

terra (version 0.8-5)

draw: Draw a polygon, line, extent, or points

Description

Draw on a plot (map) to get a SpatVector or SpatExtent object for later use. After calling the function, start clicking on the map. To finish, right-click and select "stop".

Usage

# S4 method for character
draw(x="extent", col="red", lwd=2, ...)

Arguments

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

...

additional arguments passed to locator

Value

SpatVector or SpatExtent

See Also

locator