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

Appearance settings

Commit f0aaec9

Browse filesBrowse files
committed
update return type of Axes.axhspan and Axes.axvspan in interface
1 parent 5112ad5 commit f0aaec9
Copy full SHA for f0aaec9

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎lib/matplotlib/axes/_axes.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.pyi
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ class Axes(_AxesBase):
155155
) -> AxLine: ...
156156
def axhspan(
157157
self, ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs
158-
) -> Polygon: ...
158+
) -> Rectangle: ...
159159
def axvspan(
160160
self, xmin: float, xmax: float, ymin: float = ..., ymax: float = ..., **kwargs
161-
) -> Polygon: ...
161+
) -> Rectangle: ...
162162
def hlines(
163163
self,
164164
y: float | ArrayLike,

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,7 +2882,7 @@ def axhline(y: float = 0, xmin: float = 0, xmax: float = 1, **kwargs) -> Line2D:
28822882
@_copy_docstring_and_deprecators(Axes.axhspan)
28832883
def axhspan(
28842884
ymin: float, ymax: float, xmin: float = 0, xmax: float = 1, **kwargs
2885-
) -> Polygon:
2885+
) -> Rectangle:
28862886
return gca().axhspan(ymin, ymax, xmin=xmin, xmax=xmax, **kwargs)
28872887

28882888

@@ -2920,7 +2920,7 @@ def axvline(x: float = 0, ymin: float = 0, ymax: float = 1, **kwargs) -> Line2D:
29202920
@_copy_docstring_and_deprecators(Axes.axvspan)
29212921
def axvspan(
29222922
xmin: float, xmax: float, ymin: float = 0, ymax: float = 1, **kwargs
2923-
) -> Polygon:
2923+
) -> Rectangle:
29242924
return gca().axvspan(xmin, xmax, ymin=ymin, ymax=ymax, **kwargs)
29252925

29262926

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.