@@ -2874,33 +2874,36 @@ def ticklabel_format(self, *, axis='both', style='', scilimits=None,
2874
2874
2875
2875
def locator_params (self , axis = 'both' , tight = None , ** kwargs ):
2876
2876
"""
2877
- Control behavior of tick locators.
2877
+ Control behavior of major tick locators.
2878
+
2879
+ Because the locator is involved in autoscaling, `~.Axes.autoscale_view`
2880
+ is called automatically after the parameters are changed.
2878
2881
2879
2882
Parameters
2880
2883
----------
2881
2884
axis : {'both', 'x', 'y'}, optional
2882
2885
The axis on which to operate.
2883
2886
2884
2887
tight : bool or None, optional
2885
- Parameter passed to :meth:` autoscale_view`.
2888
+ Parameter passed to `~.Axes. autoscale_view`.
2886
2889
Default is None, for no change.
2887
2890
2888
2891
Other Parameters
2889
2892
----------------
2890
- **kw
2893
+ **kwargs
2891
2894
Remaining keyword arguments are passed to directly to the
2892
- :meth:`~matplotlib.ticker.MaxNLocator.set_params` method.
2895
+ ``set_params()`` method of the locator. Supported keywords depend
2896
+ on the type of the locator. See for example
2897
+ `~.ticker.MaxNLocator.set_params` for the `.ticker.MaxNLocator`
2898
+ used by default for linear axes.
2893
2899
2894
- Typically one might want to reduce the maximum number of ticks and use
2895
- tight bounds when plotting small subplots, for example::
2900
+ Examples
2901
+ --------
2902
+ When plotting small subplots, one might want to reduce the maximum
2903
+ number of ticks and use tight bounds, for example::
2896
2904
2897
2905
ax.locator_params(tight=True, nbins=4)
2898
2906
2899
- Because the locator is involved in autoscaling, :meth:`autoscale_view`
2900
- is called automatically after the parameters are changed.
2901
-
2902
- This presently works only for the `~matplotlib.ticker.MaxNLocator` used
2903
- by default on linear axes, but it may be generalized.
2904
2907
"""
2905
2908
_x = axis in ['x' , 'both' ]
2906
2909
_y = axis in ['y' , 'both' ]
0 commit comments