Figure layout
Assembling and manipulating the figure itself, rather than any one axes:
sizing and DPI, manual and automatic margins, multi-cell subplot spans,
label alignment across a grid, figure-space text and legends, a
multi-figure Report, and clearing/reusing a Figure.
The Grouping axes section below covers fig.group() and the
GroupLayout builder – drawing labeled boxes
around clusters of related panels, and describing a whole grid of them
declaratively instead of hand-slicing one big array.
save(): dpi, transparent, format, and file-like targets
Grouping axes
fig.group() draws a labeled box around a set of axes – a cluster of
related panels in a larger grid, or a single one worth calling out –
without a separate figure or a caption pointing back to it. The box clears
each axes’ own tick labels, axis labels, and title, not just its bare plot
rect; tight_layout() reserves margin for a group whose title faces the
grid’s own outer edge, the same way it already does for a
suptitle/colorbar/figure legend. fig.group_spacing() reserves extra
room between subplots for group boxes at interior boundaries, where no
title faces the boundary and nothing widens it automatically otherwise –
without discarding tight_layout()’s own margins the way
subplots_adjust() would.
Many groups sharing one outer edge share one margin
500 panels, 250 groups, each with its own colorbar
Mosaic titles, planning a layout ahead, and an ordinary grid’s own lookup
Finding a group or axes again: title, id, or position
Reclaiming whitespace after removing axes and groups