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