MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / AutoLocator

Class AutoLocator

lib/matplotlib/ticker.py:3028–3047  ·  view source on GitHub ↗

Place evenly spaced ticks, with the step size and maximum number of ticks chosen automatically. This is a subclass of `~matplotlib.ticker.MaxNLocator`, with parameters *nbins = 'auto'* and *steps = [1, 2, 2.5, 5, 10]*.

Source from the content-addressed store, hash-verified

3026
3027
3028class AutoLocator(MaxNLocator):
3029 """
3030 Place evenly spaced ticks, with the step size and maximum number of ticks chosen
3031 automatically.
3032
3033 This is a subclass of `~matplotlib.ticker.MaxNLocator`, with parameters
3034 *nbins = 'auto'* and *steps = [1, 2, 2.5, 5, 10]*.
3035 """
3036 def __init__(self):
3037 """
3038 To know the values of the non-public parameters, please have a
3039 look to the defaults of `~matplotlib.ticker.MaxNLocator`.
3040 """
3041 if mpl.rcParams['_internal.classic_mode']:
3042 nbins = 9
3043 steps = [1, 2, 5, 10]
3044 else:
3045 nbins = 'auto'
3046 steps = [1, 2, 2.5, 5, 10]
3047 super().__init__(nbins=nbins, steps=steps)
3048
3049
3050class AutoMinorLocator(Locator):

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…