diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 07f15a87b1bc..94e030556229 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -1823,9 +1823,17 @@ def set_ticks(self, ticks, labels=None, *, minor=False, **kwargs): Parameters ---------- ticks : list of floats - List of tick locations. + List of tick locations. The axis `.Locator` is replaced by a + `~.ticker.FixedLocator`. + + Some tick formatters will not label arbitrary tick positions; + e.g. log formatters only label decade ticks by default. In + such a case you can set a formatter explicitly on the axis + using `.Axis.set_major_formatter` or provide formatted + *labels* yourself. labels : list of str, optional - List of tick labels. If not set, the labels show the data value. + List of tick labels. If not set, the labels are generated with + the axis tick `.Formatter`. minor : bool, default: False If ``False``, set the major ticks; if ``True``, the minor ticks. **kwargs