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 93a8cfe

Browse filesBrowse files
authored
Merge pull request #27506 from meeseeksmachine/auto-backport-of-pr-27504-on-v3.8.x
Backport PR #27504 on branch v3.8.x (DOC: correct return type for axline)
2 parents 11ee6db + 8b40424 commit 93a8cfe
Copy full SHA for 93a8cfe

File tree

Expand file treeCollapse file tree

3 files changed

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

3 files changed

+5
-5
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ def axline(self, xy1, xy2=None, *, slope=None, **kwargs):
893893
894894
Returns
895895
-------
896-
`.Line2D`
896+
`.AxLine`
897897
898898
Other Parameters
899899
----------------

‎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
@@ -18,7 +18,7 @@ from matplotlib.contour import ContourSet, QuadContourSet
1818
from matplotlib.image import AxesImage, PcolorImage
1919
from matplotlib.legend import Legend
2020
from matplotlib.legend_handler import HandlerBase
21-
from matplotlib.lines import Line2D
21+
from matplotlib.lines import Line2D, AxLine
2222
from matplotlib.mlab import GaussianKDE
2323
from matplotlib.patches import Rectangle, FancyArrow, Polygon, StepPatch, Wedge
2424
from matplotlib.quiver import Quiver, QuiverKey, Barbs
@@ -151,7 +151,7 @@ class Axes(_AxesBase):
151151
*,
152152
slope: float | None = ...,
153153
**kwargs
154-
) -> Line2D: ...
154+
) -> AxLine: ...
155155
def axhspan(
156156
self, ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs
157157
) -> Polygon: ...

‎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
@@ -130,7 +130,7 @@
130130

131131
# We may not need the following imports here:
132132
from matplotlib.colors import Normalize
133-
from matplotlib.lines import Line2D
133+
from matplotlib.lines import Line2D, AxLine
134134
from matplotlib.text import Text, Annotation
135135
from matplotlib.patches import Polygon, Rectangle, Circle, Arrow
136136
from matplotlib.widgets import Button, Slider, Widget
@@ -2721,7 +2721,7 @@ def axline(
27212721
*,
27222722
slope: float | None = None,
27232723
**kwargs,
2724-
) -> Line2D:
2724+
) -> AxLine:
27252725
return gca().axline(xy1, xy2=xy2, slope=slope, **kwargs)
27262726

27272727

0 commit comments

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