Skip to content

Commit a98cd5e

Browse files
authored
Merge pull request #29132 from meeseeksmachine/auto-backport-of-pr-29128-on-v3.10.x
Backport PR #29128 on branch v3.10.x (Tweak AutoMinorLocator docstring.)
2 parents b1debc4 + f86f239 commit a98cd5e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

lib/matplotlib/ticker.py

+11-10
Original file line numberDiff line numberDiff line change
@@ -2930,20 +2930,21 @@ class AutoMinorLocator(Locator):
29302930
Place evenly spaced minor ticks, with the step size and maximum number of ticks
29312931
chosen automatically.
29322932
2933-
The Axis scale must be linear with evenly spaced major ticks .
2933+
The Axis must use a linear scale and have evenly spaced major ticks.
29342934
"""
29352935

29362936
def __init__(self, n=None):
29372937
"""
2938-
*n* is the number of subdivisions of the interval between
2939-
major ticks; e.g., n=2 will place a single minor tick midway
2940-
between major ticks.
2941-
2942-
If *n* is omitted or None, the value stored in rcParams will be used.
2943-
In case *n* is set to 'auto', it will be set to 4 or 5. If the distance
2944-
between the major ticks equals 1, 2.5, 5 or 10 it can be perfectly
2945-
divided in 5 equidistant sub-intervals with a length multiple of
2946-
0.05. Otherwise it is divided in 4 sub-intervals.
2938+
Parameters
2939+
----------
2940+
n : int or 'auto', default: :rc:`xtick.minor.ndivs` or :rc:`ytick.minor.ndivs`
2941+
The number of subdivisions of the interval between major ticks;
2942+
e.g., n=2 will place a single minor tick midway between major ticks.
2943+
2944+
If *n* is 'auto', it will be set to 4 or 5: if the distance
2945+
between the major ticks equals 1, 2.5, 5 or 10 it can be perfectly
2946+
divided in 5 equidistant sub-intervals with a length multiple of
2947+
0.05; otherwise, it is divided in 4 sub-intervals.
29472948
"""
29482949
self.ndivs = n
29492950

0 commit comments

Comments
 (0)