Add a basemap to a ggplot2 layer.
Usage
set_basemap(x, basemap = FALSE, call = caller_env())
make_basemap(x, basemap = FALSE, call = caller_env())
Arguments
- x
A ggproto object or list of ggproto objects.
- basemap
Either a logical vector or ggplot object.
If logical and
TRUE
, add x toggplot2::ggplot()
. IfFALSE
, return x as is.If a ggplot, add x to basemap object.
If a ggproto object (or list that contains a ggproto object), add x and basemap object to
ggplot2::ggplot()
.- call
The execution environment of a currently running function, e.g.
caller_env()
. The function will be mentioned in error messages as the source of the error. See thecall
argument ofabort()
for more information.