vanzelfsprekend

Tick spacing

The tick count follows the axis's length and the labels' size; spacing and n set it yourself.

How many ticks an axis carries is not fixed. apply and range_frame aim for a gap between ticks measured in tick-label heights, seven along x and four along y, so a postage-stamp panel gets two or three ticks, a full-width figure five or six, and a poster with 24 pt labels thins its ticks out without being told. The same call at two widths:

2026-09-14T23:21:59.658733 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/

The same record at 12 cm and at 2 cm under the same call. The wide axes carries four year labels and the narrow one two, and the two y axes agree because they are the same height.

spacing sets that gap, a number for both axes or a tuple (x, y), and n asks for a count outright when you already know it:

ax.vzs.range_frame(spacing=(10, 4))
ax.vzs.range_frame(n=3)

Both go to the default locator, so a locator you set afterwards replaces them along with the rest of it; the locators how-to has that order. The count is read when the ticks are computed, not when you call apply, which is why the figure above needs no per-panel argument; the frame follows the axes says how.