Skip to content

Multi-panel Figures

The Figure class composes multiple Plot objects into a single multi-panel figure using a backend-agnostic grid layout.

Simple grids

Figure.grid() is the fastest way to build a uniform layout:

Rules:

  • Each inner list is a row.
  • Rows with fewer plots than the maximum width are auto-spanned evenly.
  • The number of plots per row must evenly divide the maximum row length.

Explicit spanning

Use Figure(...).add(...) for irregular layouts:

add() returns self, so calls can be chained.

Shared axes

Sizing and themes

Backend support

sharex / sharey are fully supported by the matplotlib and plotly backends. The Altair backend does not support rowspan > 1.