# matplotlib.axis.Axis.set_ticklabels¶

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

Set the text values of the tick labels.

Warning

This method should only be used after fixing the tick positions using Axis.set_ticks. Otherwise, the labels may end up in unexpected positions.

Parameters: ticklabelssequence of str or of TextsTexts for labeling each tick location in the sequence set by Axis.set_ticks; the number of labels must match the number of locations. minorboolIf True, set minor ticks instead of major ticks. **kwargsText properties. list of TextsFor each tick, includes tick.label1 if it is visible, then tick.label2 if it is visible, in that order.