plotExtent | R Documentation |
This function creates a "rectangular" SpatVector
object with the same dimensions as a plot window. It is especially useful for cropping subsequent rasters or vector objects to the plot window. A plot must be made before calling this function.
plotExtent(x = NULL)
x |
Either |
SpatVector
extentToVect
if (FALSE) {
library(sf)
data(mad0)
plot(st_geometry(mad0))
outline <- plotExtent(mad0)
plot(outline, col='cornflowerblue', lty='dotted')
plot(st_geometry(mad0), add=TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.