Arrange small multiples in grid layoutSource:
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
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 ) knit_print.tmap_arrange(x, ..., options = NULL) # S3 method for tmap_arrange print(x, knit = FALSE, ..., options = NULL)
number of columns
number of rows
vector of column widths. It should add up to 1 and the length should be equal to
vector of row heights. It should add up to 1 and the length should be equal to
logical. Should the navigation in view mode (zooming and panning) be synchronized? By default
aspect ratio. The aspect ratio of each map. Normally, this is controlled by the
tm_layout()(also a tmap option). This argument will overwrite it, unless set to
NULL. The default value for
aspis 0, which means that the aspect ratio is adjusted to the size of the device divided by the number of columns and rows. When
aspis set to
NA, which is also the default value for
tm_layout(), the aspect ratio will be adjusted to the used shapes.
outer.margins, numeric vector four or a single value. If defines the outer margins for each multiple. If will overwrite the
tm_layout(), unless set to
tmap_arrangeobject (returned from
options passed on to
The global option
tmap.limits controls the limit of the number of facets that are plotted.
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.