set_min_n_ticks

PlasmaCalcs.plotting.plot_tools.plot_tricks.set_min_n_ticks(n, ax=None, *, fail_ok=True)

set the minimum number of ticks on this axes (current axes if None provided).

Alters the tick locators for x and y axes here, via locator.set_params(min_n_ticks=n)
If tick locators have ‘base’, use locator.base.set_params(min_n_ticks=n) instead.
(e.g. RadialLocator and ThetaLocator have ‘base’.)
n: int or 2-tuple of None or int
minimum number of ticks to have on the x, y axes.
single int –> equivalent to providing (n, n).
None in tuple –> don’t set min_n_ticks for that axis.
fail_ok: bool
whether it is okay to fail silently if not able to set min_n_ticks in the existing locators.
returns (whether succeeded for x-axis, whether succeeded for y-axis)
(None if None in original n input for that axis)
Examples:
# set x and y axes to each have at least 5 ticks
set_min_n_ticks(5)
# set y-axis to have at least 3 ticks; x-axis unaffected
set_min_n_ticks((None, 3))
# set all colorbars to have at least 7 ticks
for cax in pc.get_colorbar_axes():
pc.set_min_n_ticks(7, cax)