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