tmap_arrange | R Documentation |
Arrange small multiples in a grid layout. Normally, small multiples are created
by specifying multiple variables for one aesthetic or by specifying the by argument
(see tm_facets()
). This function can be used to arrange custom small multiples in a grid layout.
tmap_arrange(
...,
ncol = NA,
nrow = NA,
widths = NA,
heights = NA,
sync = FALSE,
asp = 0,
outer.margins = 0.02
)
## S3 method for class 'tmap_arrange'
knit_print(x, ..., options = NULL)
## S3 method for class 'tmap_arrange'
print(x, knit = FALSE, ..., options = NULL)
... |
|
ncol |
number of columns |
nrow |
number of rows |
widths |
vector of column widths. It should add up to 1 and the length
should be equal to |
heights |
vector of row heights. It should add up to 1 and the length
should be equal to |
sync |
logical. Should the navigation in view mode (zooming and panning)
be synchronized? By default |
asp |
aspect ratio. The aspect ratio of each map. Normally, this is
controlled by the |
outer.margins |
outer.margins, numeric vector four or a single value.
If defines the outer margins for each multiple. If will overwrite the
|
x |
a |
options |
options passed on to |
knit |
should |
The global option tmap.limits
controls the limit of the number of facets that are plotted.
By default, tmap_options(tmap.limits = c(facets.view=4, facets.plot=64))
.
The maximum number of interactive facets is set to four since otherwise it may become very slow.
tm1 = tm_shape(World) + tm_polygons("HPI")
tm2 = tm_shape(metro) + tm_bubbles(size = "pop2020")
tmap_arrange(tm1, tm2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.