Skip to content

Commit 66ee071

Browse files
committed
Remove old xlim and ylim
1 parent 92dc045 commit 66ee071

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

lib/matplotlib/pyplot.py

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,81 +2119,6 @@ def box(on: bool | None = None) -> None:
21192119

21202120
## Axis ##
21212121

2122-
2123-
def xlim(*args, **kwargs) -> tuple[float, float]:
2124-
"""
2125-
Get or set the x limits of the current Axes.
2126-
2127-
Call signatures::
2128-
2129-
left, right = xlim() # return the current xlim
2130-
xlim((left, right)) # set the xlim to left, right
2131-
xlim(left, right) # set the xlim to left, right
2132-
2133-
If you do not specify args, you can pass *left* or *right* as kwargs,
2134-
i.e.::
2135-
2136-
xlim(right=3) # adjust the right leaving left unchanged
2137-
xlim(left=1) # adjust the left leaving right unchanged
2138-
2139-
Setting limits turns autoscaling off for the x-axis.
2140-
2141-
Returns
2142-
-------
2143-
left, right
2144-
A tuple of the new x-axis limits.
2145-
2146-
Notes
2147-
-----
2148-
Calling this function with no arguments (e.g. ``xlim()``) is the pyplot
2149-
equivalent of calling `~.Axes.get_xlim` on the current Axes.
2150-
Calling this function with arguments is the pyplot equivalent of calling
2151-
`~.Axes.set_xlim` on the current Axes. All arguments are passed though.
2152-
"""
2153-
ax = gca()
2154-
if not args and not kwargs:
2155-
return ax.get_xlim()
2156-
ret = ax.set_xlim(*args, **kwargs)
2157-
return ret
2158-
2159-
2160-
def ylim(*args, **kwargs) -> tuple[float, float]:
2161-
"""
2162-
Get or set the y-limits of the current Axes.
2163-
2164-
Call signatures::
2165-
2166-
bottom, top = ylim() # return the current ylim
2167-
ylim((bottom, top)) # set the ylim to bottom, top
2168-
ylim(bottom, top) # set the ylim to bottom, top
2169-
2170-
If you do not specify args, you can alternatively pass *bottom* or
2171-
*top* as kwargs, i.e.::
2172-
2173-
ylim(top=3) # adjust the top leaving bottom unchanged
2174-
ylim(bottom=1) # adjust the bottom leaving top unchanged
2175-
2176-
Setting limits turns autoscaling off for the y-axis.
2177-
2178-
Returns
2179-
-------
2180-
bottom, top
2181-
A tuple of the new y-axis limits.
2182-
2183-
Notes
2184-
-----
2185-
Calling this function with no arguments (e.g. ``ylim()``) is the pyplot
2186-
equivalent of calling `~.Axes.get_ylim` on the current Axes.
2187-
Calling this function with arguments is the pyplot equivalent of calling
2188-
`~.Axes.set_ylim` on the current Axes. All arguments are passed though.
2189-
"""
2190-
ax = gca()
2191-
if not args and not kwargs:
2192-
return ax.get_ylim()
2193-
ret = ax.set_ylim(*args, **kwargs)
2194-
return ret
2195-
2196-
21972122
def xticks(
21982123
ticks: ArrayLike | None = None,
21992124
labels: Sequence[str] | None = None,

0 commit comments

Comments
 (0)