Multiple panels

For ClimCanvas v1.02.1

This chapter describes how to arrange several panels (matplotlib axes) in one figure. Each panel can have its own plot mode, so a map and a time series can share one figure. For the size and margins of the whole figure see Basics.

Panel layout and the editing flow

Open "Panel layout" in the main area to see the figure grid and the list of panels.

Item Description
Rows / Columns Grid size (1 to 8 each, default 1×1). Panels fill the grid row by row from the top left
Panel list One row per panel ("number: plot mode"). "←" and "→" move the panel earlier or later in the order, the duplicate icon appends a new panel with a copy of the settings, and the delete icon removes the panel (only when there are two or more panels)
Add panel Appends an empty panel
Panel to edit Buttons arranged like the grid. The settings of the pressed panel appear in the sidebar (red = being edited)
🔗 All panels shared Toggles the shared editing mode ("All panels shared" editing)
Panel layout
The 'Panel layout' expander. Two panels in a 1-row, 2-column grid, with panel 2 being edited.

Only the settings of the panel being edited appear in the sidebar. The plot mode of a panel is chosen under "Plot mode (per panel)" → "Plot mode" in the sidebar, and each panel can use a different mode. A panel you add or duplicate automatically becomes the one being edited.

There is one "Figure size" for the whole figure, and each panel is sized to fit its grid cell. The aspect ratio of each panel's plot area is set with "Plot size" (Figure size and aspect ratio).

Two-panel figure
Two horizontal maps side by side (Figure size 12 × 4 inch).

Recommended workflow

The quickest way is to finish one panel, duplicate it, align the appearance with "All panels shared" editing, and finally select the panels one by one to change the variable or time.

Row and column ratios

Enter positive numbers separated by commas in "Column width ratios" and "Row height ratios" (e.g. 2, 1, 1). Blank means equal.

Merged and empty cells (mosaic)

When a string is entered in "Merged / empty cells (mosaic)", it determines the grid in preference to the rows and columns inputs.

Example Meaning
ABC;DEE 2 rows × 3 columns with 5 panels. Columns 2 and 3 of the bottom row are merged
AAB;C.B The left two cells of the top row are merged, the right column spans both rows, and the bottom middle cell is empty
AAB;AAC The left 2×2 block is merged into one panel

If the mosaic is invalid, the message "Invalid mosaic; falling back to row-major placement" appears and the panels are placed row by row according to the rows and columns inputs. The "Panel to edit" buttons follow the same arrangement as the mosaic (a merged cell is represented by its top-left cell; empty cells have no button).

Panel labels

The (a), (b) labels used in multi-panel figures in papers are set per panel under "Text & markers" → "Panel label" in the sidebar.

Item Default
Show panel label Off
Label text (a)
x, y (axes coordinates) 0, 1.02 (outside the top-left corner of the plot frame)
Font size / Bold / Label color 12 / On / black

The text is typed by hand for each panel. Panel labels are excluded from "All panels shared" editing, so each panel keeps its own text even in shared editing mode.

"All panels shared" editing

Pressing "🔗 All panels shared" under "Panel layout" switches to shared editing mode, which shows the panel edited last as the representative in the sidebar. Settings changed in this mode are applied to all panels. Press the button again, or any of the "Panel to edit" buttons, to leave the mode.

Panels created by duplication can be kept in exactly the same appearance with shared editing.

Shared colorbar

"Figure-wide format" → "Shared colorbar (all panels)" → "Show a colorbar shared by all panels" adds one colorbar shared by all panels.

Use the same fill settings on all panels

The shared colorbar uses the colors of the first fill layer as the representative and does not look at the colors of other panels. Use the same colormap, value range and number of levels for the fill on all panels, and turn off the individual colorbar of each layer. Nothing is drawn when there is no fill layer at all.

Item Description Default
Label Colorbar label none
Position right / bottom / left / top right
Show ticks on the opposite side Puts the tick marks, tick labels and label on the opposite side of the colorbar Off
Show label on the opposite side of the ticks Puts only the label on the side opposite to the tick labels Off
Length (shrink) Length relative to the figure (0.3 to 1.0) 1.0
Thickness (aspect) Larger is thinner (5 to 50) 30
Edge width / Tick mark width Set after unticking "Automatic edge width" / "Automatic tick mark width" (0 for no edge) 0.8
Gap from the plot (pad) Set after unticking "Automatic gap from the plot" 0.05 vertical, 0.15 horizontal
Label font size / Tick label font size 10 / 10
Label padding / Tick label padding Set in pt after unticking "Automatic label padding" / "Automatic tick label padding" (negative brings them closer) 4 / 3.5

There is no way to add a separate colorbar per row or column. Use the colorbars of the individual layers when needed.

Animation and multiple panels

Compatibility notes