matplotlib 3.5.1

NotesReturnsBackRef
ylim(*args, **kwargs)

Call signatures:

bottom, top = ylim()  # return the current ylim
ylim((bottom, top))   # set the ylim to bottom, top
ylim(bottom, top)     # set the ylim to bottom, top

If you do not specify args, you can alternatively pass bottom or top as kwargs, i.e.:

ylim(top=3)  # adjust the top leaving bottom unchanged
ylim(bottom=1)  # adjust the bottom leaving top unchanged

Setting limits turns autoscaling off for the y-axis.

Notes

Calling this function with no arguments (e.g. ylim() ) is the pyplot equivalent of calling :None:None:`~.Axes.get_ylim` on the current axes. Calling this function with arguments is the pyplot equivalent of calling :None:None:`~.Axes.set_ylim` on the current axes. All arguments are passed though.

Returns

bottom, top

A tuple of the new y-axis limits.

Get or set the y-limits of the current axes.

Examples

See :

Back References

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

scipy.signal._spectral_py.welch scipy.signal.tukey scipy.misc._common.electrocardiogram scipy.signal.windows._windows.tukey scipy.signal._fir_filter_design.kaiserord scipy.signal._filter_design.sosfreqz scipy.signal._spectral_py.periodogram scipy.signal._waveforms.square scipy.signal._spectral_py.istft 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#1703
type: <class 'function'>
Commit: