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]*.
| 3026 | |
| 3027 | |
| 3028 | class 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 | |
| 3050 | class AutoMinorLocator(Locator): |
no outgoing calls
searching dependent graphs…