Note
Go to the end to download the full example code.
Tick position
tick_top / tick_right move an axes’ ticks and labels off their
default edges – useful for panels stacked directly beneath each other with a
shared “top” x-axis. tick_bottom / tick_left move them back; the
default axes already draws there, so the left panel below calls them only to
make the (otherwise invisible) default explicit.

Live figure — pick a tool, then zoom, pan, point-pick or annotate. Nothing is active until a tool is selected.
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, (ax1, ax2) = plotpress.subplots(1, 2, figsize=(8, 3.5))
ax1.plot(x, np.sin(x), color="#2ca02c")
ax1.tick_bottom()
ax1.tick_left()
ax1.set_title("tick_bottom + tick_left (default)", size=11)
ax2.plot(x, np.sin(x), color="#2ca02c")
ax2.tick_top()
ax2.tick_right()
ax2.set_title("tick_top + tick_right", size=11)
fig.tight_layout()
Total running time of the script: (0 minutes 0.056 seconds)