matplotlib 3.5.1

NotesReturnsBackRef
xlim(*args, **kwargs)

Call signatures:

left, right = xlim()  # return the current xlim
xlim((left, right))   # set the xlim to left, right
xlim(left, right)     # set the xlim to left, right

If you do not specify args, you can pass left or right as kwargs, i.e.:

xlim(right=3)  # adjust the right leaving left unchanged
xlim(left=1)  # adjust the left leaving right unchanged

Setting limits turns autoscaling off for the x-axis.

Notes

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

Returns

left, right

A tuple of the new x-axis limits.

Get or set the x 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.istft scipy.signal._fir_filter_design.kaiserord scipy.misc._common.electrocardiogram 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#1666
type: <class 'function'>
Commit: