forked from paleolimbot/ggspatial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayer_spatial.bbox.Rd
43 lines (36 loc) · 1.29 KB
/
layer_spatial.bbox.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layer-spatial-bbox.R
\name{layer_spatial.bbox}
\alias{layer_spatial.bbox}
\alias{annotation_spatial.bbox}
\alias{shadow_spatial.bbox}
\title{Add a bounding box to a map}
\usage{
\method{layer_spatial}{bbox}(data, mapping = aes(), ..., detail = 30)
\method{annotation_spatial}{bbox}(data, mapping = aes(), ..., detail = 30)
\method{shadow_spatial}{bbox}(data, ..., detail = 30)
}
\arguments{
\item{data}{A bounding box generated by \code{\link[sf:st_bbox]{sf::st_bbox()}}}
\item{mapping}{A mapping, created using \link[ggplot2:aes]{aes}.}
\item{...}{Passed to \link[ggplot2:ggsf]{geom_sf}}
\item{detail}{Passed to \code{\link[sf:geos_unary]{sf::st_segmentize()}}: the number of line segments
per quadrant of the bounding box. Increase this number for a smoother
projected bounding box.}
}
\description{
To include a bounding box without drawing it, use \code{\link[=shadow_spatial]{shadow_spatial()}} on the
original object.
}
\examples{
library(ggplot2)
load_longlake_data()
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)
}