Skip to main content

Module wrap

Module wrap 

Source

Structs§

FacetGrid
A facet_wrap grid of equal, fixed-aspect panels (e.g. maps under coord_sf): the column/row count and each panel’s size.

Functions§

compute_wrap_panels
Compute panel layout for facet_wrap.
fit_grid
Lay n panels of aspect aspect (height / width) into an area_w × area_h facet area, each panel topped by a strip_h strip and separated by gap_x / gap_y. With ncol = None the column count is the one that gives the largest panels (ties: fewer rows); a given ncol is clamped to 1..=n. Every panel is panel_w × panel_h, with panel_h = panel_w × aspect.
natural_height
The natural height of a facet_wrap area of fixed-aspect panels at width: the column count (a given ncol, else as many columns as keep each panel at least min_panel_w wide, at most n) and nrow × (panel_h + strip_h) + (nrow − 1) × gap_y for panels filling the width. Lets a host size a faceted map before rendering it.