A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.xlim.html below:

matplotlib.pyplot.xlim — Matplotlib 3.10.3 documentation

matplotlib.pyplot.xlim#
matplotlib.pyplot.xlim(*args, **kwargs)[source]#

Get or set the x limits of the current Axes.

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.

Returns:
left, right

A tuple of the new x-axis limits.

Notes

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

Examples using matplotlib.pyplot.xlim#

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4