View source: R/layer-spatial-bbox.R
layer_spatial.bbox | R Documentation |
To include a bounding box without drawing it, use shadow_spatial()
on the
original object.
## S3 method for class 'bbox'
layer_spatial(data, mapping = aes(), ..., detail = 30)
## S3 method for class 'bbox'
annotation_spatial(data, mapping = aes(), ..., detail = 30)
## S3 method for class 'bbox'
shadow_spatial(data, ..., detail = 30)
data |
A bounding box generated by |
mapping |
A mapping, created using aes. |
... |
Passed to geom_sf |
detail |
Passed to |
library(ggplot2)
load_longlake_data(which = c("longlake_waterdf", "longlake_depthdf"))
ggplot() +
layer_spatial(sf::st_bbox(longlake_waterdf)) +
layer_spatial(longlake_depthdf)
# use shadow_spatial() to include the geographic area of an object
# without drawing it
ggplot() +
shadow_spatial(longlake_waterdf) +
layer_spatial(longlake_depthdf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.