Add SpatVector data to a map
Add SpatVector data to a plot (map) with points
, lines
, or polys
.
These are simpler alternatives for plot(x, add=TRUE)
## S4 method for signature 'SpatVector' points(x, col, cex=1, pch=20, ...) ## S4 method for signature 'SpatVector' lines(x, y=NULL, col, lwd=1, lty=1, arrows=FALSE, ...) ## S4 method for signature 'SpatVector' polys(x, col, border="black", lwd=1, lty=1, ...) ## S4 method for signature 'SpatExtent' points(x, col, ...) ## S4 method for signature 'SpatExtent' lines(x, col, ...)
x |
SpatVector or SpatExtent |
y |
missing or SpatVector. If both |
col |
character. Colors |
border |
character. color(s) of the polygon borders. Use |
cex |
numeric. point size magnifier. See |
pch |
positive integer, line type. See |
lwd |
numeric, line-width. See |
lty |
positive integer, line type. See |
arrows |
logical. If |
... |
additional graphical arguments such as |
f <- system.file("ex/lux.shp", package="terra") v <- vect(f) r <- rast(v) values(r) <- 1:ncell(r) plot(r) lines(v) points(v)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.