10000 document axhline from hlines docstring · matplotlib/matplotlib@988c5ec · GitHub
[go: up one dir, main page]

Skip to content

Commit 988c5ec

Browse files
document axhline from hlines docstring
to increase discoverability of axhline (same for axvline)
1 parent fcce35d commit 988c5ec

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,8 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
705705
706706
See also
707707
--------
708-
axhspan : for example plot and source code
708+
hline : add horizontal lines in data coordinates
709+
axhspan : add a horizontal span (rectangle) across the axis
709710
"""
710711

711712
if "transform" in kwargs:
@@ -771,7 +772,8 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
771772
772773
See also
773774
--------
774-
axhspan : for example plot and source code
775+
vline : add vertical lines in data coordinates
776+
axvspan : add a vertical span (rectangle) across the axis
775777
"""
776778

777779
if "transform" in kwargs:
@@ -830,8 +832,7 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
830832
831833
See Also
832834
--------
833-
axvspan : Add a vertical span (rectangle) across the axes.
834-
835+
axvspan : add a vertical span across the axes
835836
"""
836837
trans = self.get_yaxis_transform(which='grid')
837838

@@ -888,7 +889,7 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
888889
889890
See Also
890891
--------
891-
axhspan
892+
axhspan : add a horizontal span across the axes
892893
893894
Examples
894895
--------
@@ -947,7 +948,7 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
947948
See also
948949
--------
949950
vlines : vertical lines
950-
951+
axhline: horizontal line across the axes
951952
"""
952953

953954
# We do the conversion first since not all unitized data is uniform
@@ -1025,7 +1026,7 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
10251026
See also
10261027
--------
10271028
hlines : horizontal lines
1028-
1029+
axvline: vertical line across the axes
10291030
"""
10301031

10311032
self._process_unit_info(xdata=x, ydata=[ymin, ymax], kwargs=kwargs)

0 commit comments

Comments
 (0)
0