label_outer

label_outer hides tick labels except on the bottom row and left column of a subplot grid – a quick declutter for a grid of related panels.

plot 07 label outer

This figure has 9 panels — too many to usefully embed at a fixed size.

Open the full interactive example in a new page to pick a tool, then zoom, pan, point-pick or annotate any panel.

View this figure’s Vega export ↗ — the raw JSON spec, rendered live by a real Vega engine.

View this figure’s Vega-Lite export ↗ — the raw JSON spec(s), rendered live by a real Vega-Lite engine.

import numpy as np
import plotpress

x = np.linspace(0, 10, 200)

fig, axes = plotpress.subplots(3, 3, figsize=(7, 7))
for i, ax in enumerate(axes.ravel()):
    ax.plot(x, np.sin(x + i))
    ax.label_outer()
fig.suptitle("label_outer on a 3x3 grid")

Total running time of the script: (0 minutes 0.172 seconds)

Gallery generated by Sphinx-Gallery