matplotlib.axis.Axis.get_ticklabels#

Axis.get_ticklabels(minor=False, which=None)[source]#

Get this Axis' tick labels.

Warning

Ticks and their constituent parts, including tick labels, are not persistent. Various operations can create, delete, and modify the tick instances; see Tick objects.

You should generally use Axis.set_tick_params / Axis.get_tick_params to define and query tick styling; see Styling ticks (tick parameters).

Parameters:
minorbool

Whether to return the minor or the major ticklabels.

whichNone, ('minor', 'major', 'both')

Overrides minor.

Selects which ticklabels to return

Returns:
list of Text