volcano_polygon | R Documentation |
Generate a polygon for the volcano stars
volcano_polygon()
simple feature geometry for a POLYGON
## Not run:
library(dplyr)
x <- volcano_stack(indexed = TRUE)
p <- volcano_polygon()
pts <- randomPts(x, polygon = p)
par(mfrow = c(1,3))
for (i in seq_len(3)){
plot(x[[i]], main = paste("Layer", i))
plot(p, add = TRUE)
with(pts |> dplyr::filter(layer == i), points(x, y))
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.