matplotlib / 3.5.1 / _as_gen / matplotlib.axes.axes.set_yticklabels.html /

matplotlib.axes.Axes.set_yticklabels

Axes. set_yticklabels ( labels, *, fontdict=None, minor=False, **kwargs ) [source]

Set the yaxis' labels with list of string labels.

Warning

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

Parameters
labels list of str

The label texts.

fontdict dict, optional

A dictionary controlling the appearance of the ticklabels. The default fontdict is:

{'fontsize': rcParams['axes.titlesize'],
 'fontweight': rcParams['axes.titleweight'],
 'verticalalignment': 'baseline',
 'horizontalalignment': loc}
minor bool, default: False

Whether to set the minor ticklabels rather than the major ones.

Returns
list of Text

The labels.

Other Parameters
**kwargs Text properties.

Examples using matplotlib.axes.Axes.set_yticklabels

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.axes.Axes.set_yticklabels.html