You are reading an old version of the documentation (v3.1.1). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.axis.Axis.set_ticklabels.html
Version 3.1.2
matplotlib
Fork me on GitHub

matplotlib.axis.Axis.set_ticklabelsΒΆ

Axis.set_ticklabels(self, ticklabels, *args, minor=False, **kwargs)[source]ΒΆ

Set the text values of the tick labels.

Parameters:
ticklabels : sequence of str or of Texts

List of texts for tick labels; must include values for non-visible labels.

minor : bool

If True, set minor ticks instead of major ticks.

**kwargs

Text properties.

Returns:
labels : list of Texts

For each tick, includes tick.label1 if it is visible, then tick.label2 if it is visible, in that order.