powered by
Plot (that is, make a map of) using a SpatVector
# S4 method for SpatVector,missing plot(x, y, col, axes=TRUE, add=FALSE, ...)# S4 method for SpatVector,character plot(x, y, col, type, mar=c(5.1, 4.1, 4.1, 7.1), axes=TRUE, add=FALSE, ...)# S4 method for SpatExtent,missing plot(x, y, col, ...)# S4 method for SpatVector points(x, col, ...)# S4 method for SpatVector lines(x, col, ...)# S4 method for SpatExtent points(x, col, ...)# S4 method for SpatExtent lines(x, col, ...)
# S4 method for SpatVector,character plot(x, y, col, type, mar=c(5.1, 4.1, 4.1, 7.1), axes=TRUE, add=FALSE, ...)
# S4 method for SpatExtent,missing plot(x, y, col, ...)
# S4 method for SpatVector points(x, col, ...)
# S4 method for SpatVector lines(x, col, ...)
# S4 method for SpatExtent points(x, col, ...)
# S4 method for SpatExtent lines(x, col, ...)
SpatVector
missing or positive integer indicating the layer(s) to be plotted, or the name of the layer to be mapped
character. Colors
character. Type of map/legend. One of "continuous", "classes", or "internval"
logical. Draw axes?
numeric vector of lenght 4 to set the margins of the plot (to make space for the legend)
logical. If TRUE add the object to the current plot (for points, lines, and polygons this is an alternative to the lines or points methods
TRUE
lines
points
additional graphical arguments
# NOT RUN { f <- system.file("ex/lux.shp", package="terra") v <- vect(f) plot(v) plot(v, "ID_1") r <- rast(v) values(r) <- 1:ncell(r) plot(r) lines(v) points(v) # }
Run the code above in your browser using DataLab