matplotlib 3.5.1

NotesParametersReturnsBackRef
yticks(ticks=None, labels=None, **kwargs)

Pass no arguments to return the current values without modifying them.

Notes

Calling this function with no arguments (e.g. yticks() ) is the pyplot equivalent of calling :None:None:`~.Axes.get_yticks` and :None:None:`~.Axes.get_yticklabels` on the current axes. Calling this function with arguments is the pyplot equivalent of calling :None:None:`~.Axes.set_yticks` and :None:None:`~.Axes.set_yticklabels` on the current axes.

Parameters

ticks : array-like, optional

The list of ytick locations. Passing an empty list removes all yticks.

labels : array-like, optional

The labels to place at the given ticks locations. This argument can only be passed if ticks is passed as well.

**kwargs :

:None:None:`.Text` properties can be used to control the appearance of the labels.

Returns

locs

The list of ytick locations.

labels

The list of ylabel :None:None:`.Text` objects.

Get or set the current tick locations and labels of the y-axis.

Examples

>>> locs, labels = yticks()  # Get the current locations and labels.
... yticks(np.arange(0, 1, step=0.2)) # Set label locations.
... yticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels.
... yticks([0, 1, 2], ['January', 'February', 'March'],
...  rotation=45) # Set text labels and properties.
... yticks([]) # Disable yticks.
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.signal._filter_design.sosfreqz matplotlib.pyplot.yticks matplotlib.pyplot.plotting

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/pyplot.py#1800
type: <class 'function'>
Commit: