View source: R/layer_helpers.R
build_sf_inset_layers | R Documentation |
For plotting, use geom_sf_inset()
instead. This helper is intended to be used when
implementing custom geometries based on geom_sf_inset()
so that they can provide
parameters to control the inset.
build_sf_inset_layers(
data,
mapping,
stat,
position,
show.legend,
inherit.aes,
params,
inset,
map_base = "normal",
map_inset = "auto"
)
data , mapping , stat , position , show.legend , inherit.aes , params |
See |
inset |
Inset configuration; see |
map_base |
Controls the layer with the base map. Possible values are
|
map_inset |
Controls the layer with the inset map. Possible values are
|
A ggplot
layer, or a pair of layers.
my_custom_geom <- function(
mapping = ggplot2::aes(),
data = NULL,
stat = "my_custom_stat",
position = "identity",
...,
inset = NA,
map_base = "normal",
map_inset = "auto",
na.rm = TRUE,
inherit.aes = TRUE
) {
params <- rlang::list2(na.rm = na.rm, ...)
build_sf_inset_layers(
data = data, mapping = mapping,
stat = stat, position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = params,
inset = inset,
map_base = map_base,
map_inset = map_inset
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.