matplotlib.axes.Axes.get_xticklabels#

Axes.get_xticklabels(minor=False, which=None)[source]#

Get the xaxis' 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

Examples using matplotlib.axes.Axes.get_xticklabels#

Boxplots

Boxplots

Pick event demo

Pick event demo

The Lifecycle of a Plot

The Lifecycle of a Plot