Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite36bffb

Browse files
Add explicit getter / setter overloads for pyplot.{xlim,ylim} (#30199)
* Add xlim / ylim autogeneration- Create get_signature method- Create AXES_GETTER_SETTER_TEMPLATE- Create call_param method on generate_function(cherry picked from commite57b321)* Format with ruff(cherry picked from commit64e7921)* Remove old xlim and ylim(cherry picked from commit66ee071)* Format with ruff* Revert superfluous changes* Revert boilerplate.py and manually copy xlim and ylim overloads on pyplot.py* Remove incorrect comment about autogenerated method---------Co-authored-by: Corenthin ZOZOR <corenthin.zozor@gmail.com>
1 parent4b03f0c commite36bffb

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

‎lib/matplotlib/pyplot.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,6 +2115,24 @@ def box(on: bool | None = None) -> None:
21152115
## Axis ##
21162116

21172117

2118+
@overload
2119+
defxlim()->tuple[float,float]:
2120+
...
2121+
2122+
2123+
@overload
2124+
defxlim(
2125+
left:float|tuple[float,float]|None=None,
2126+
right:float|None=None,
2127+
*,
2128+
emit:bool=True,
2129+
auto:bool|None=False,
2130+
xmin:float|None=None,
2131+
xmax:float|None=None,
2132+
)->tuple[float,float]:
2133+
...
2134+
2135+
21182136
defxlim(*args,**kwargs)->tuple[float,float]:
21192137
"""
21202138
Get or set the x limits of the current Axes.
@@ -2152,6 +2170,24 @@ def xlim(*args, **kwargs) -> tuple[float, float]:
21522170
returnret
21532171

21542172

2173+
@overload
2174+
defylim()->tuple[float,float]:
2175+
...
2176+
2177+
2178+
@overload
2179+
defylim(
2180+
bottom:float|tuple[float,float]|None=None,
2181+
top:float|None=None,
2182+
*,
2183+
emit:bool=True,
2184+
auto:bool|None=False,
2185+
ymin:float|None=None,
2186+
ymax:float|None=None,
2187+
)->tuple[float,float]:
2188+
...
2189+
2190+
21552191
defylim(*args,**kwargs)->tuple[float,float]:
21562192
"""
21572193
Get or set the y-limits of the current Axes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp