Skip to content

Commit

Permalink
Merge pull request matplotlib#29132 from meeseeksmachine/auto-backpor…
Browse files Browse the repository at this point in the history
…t-of-pr-29128-on-v3.10.x

Backport PR matplotlib#29128 on branch v3.10.x (Tweak AutoMinorLocator docstring.)
  • Loading branch information
timhoffm authored Nov 13, 2024
2 parents b1debc4 + f86f239 commit a98cd5e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2930,20 +2930,21 @@ class AutoMinorLocator(Locator):
Place evenly spaced minor ticks, with the step size and maximum number of ticks
chosen automatically.
The Axis scale must be linear with evenly spaced major ticks .
The Axis must use a linear scale and have evenly spaced major ticks.
"""

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

Expand Down

0 comments on commit a98cd5e

Please sign in to comment.