matplotlib.axis.Axis.set_ticklabels
-
Axis.
set_ticklabels
( 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: -
ticklabels
sequence of str or of
Text
s -
Texts for labeling each tick location in the sequence set by
Axis.set_ticks
; the number of labels must match the number of locations. - minor bool
-
If True, set minor ticks instead of major ticks.
- **kwargs
-
Text properties.
Returns: -
list of
Text
s -
For each tick, includes
tick.label1
if it is visible, thentick.label2
if it is visible, in that order.
-
ticklabels
sequence of str or of
Examples using matplotlib.axis.Axis.set_ticklabels
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.4.3/api/_as_gen/matplotlib.axis.Axis.set_ticklabels.html