@@ -1961,8 +1961,9 @@ def set_ticklabels(self, labels, *, minor=False, fontdict=None, **kwargs):
1961
1961
----------
1962
1962
labels : sequence of str or of `.Text`\s
1963
1963
Texts for labeling each tick location in the sequence set by
1964
- `.Axis.set_ticks`; the number of labels must match the number of
1965
- locations.
1964
+ `.Axis.set_ticks`; the number of labels must match the number of locations.
1965
+ The labels are used as is, via a `.FixedFormatter` (without further
1966
+ formatting).
1966
1967
1967
1968
minor : bool
1968
1969
If True, set minor ticks instead of major ticks.
@@ -2093,26 +2094,25 @@ def set_ticks(self, ticks, labels=None, *, minor=False, **kwargs):
2093
2094
Parameters
2094
2095
----------
2095
2096
ticks : 1D array-like
2096
- Array of tick locations. The axis `.Locator` is replaced by a
2097
- `~.ticker.FixedLocator`.
2097
+ Array of tick locations (either floats or in axis units). The axis
2098
+ `.Locator` is replaced by a ` ~.ticker.FixedLocator`.
2098
2099
2099
- The values may be either floats or in axis units.
2100
-
2101
- Pass an empty list to remove all ticks::
2102
-
2103
- set_ticks([])
2100
+ Pass an empty list (``set_ticks([])``) to remove all ticks.
2104
2101
2105
2102
Some tick formatters will not label arbitrary tick positions;
2106
2103
e.g. log formatters only label decade ticks by default. In
2107
2104
such a case you can set a formatter explicitly on the axis
2108
2105
using `.Axis.set_major_formatter` or provide formatted
2109
2106
*labels* yourself.
2107
+
2110
2108
labels : list of str, optional
2111
- Tick labels for each location in *ticks*. *labels* must be of the same
2112
- length as *ticks*. If not set, the labels are generate using the axis
2113
- tick `.Formatter`.
2109
+ Tick labels for each location in *ticks*; must have the same length as
2110
+ *ticks*. If set, the labels are used as is, via a `.FixedFormatter`.
2111
+ If not set, the labels are generated using the axis tick `.Formatter`.
2112
+
2114
2113
minor : bool, default: False
2115
2114
If ``False``, set the major ticks; if ``True``, the minor ticks.
2115
+
2116
2116
**kwargs
2117
2117
`.Text` properties for the labels. Using these is only allowed if
2118
2118
you pass *labels*. In other cases, please use `~.Axes.tick_params`.
0 commit comments