@@ -767,20 +767,25 @@ def annotate(self, text, xy, xytext=None, xycoords='data', textcoords=None,
767
767
@_docstring .dedent_interpd
768
768
def axhline (self , y = 0 , xmin = 0 , xmax = 1 , ** kwargs ):
769
769
"""
770
- Add a horizontal line across the Axes.
770
+ Add a horizontal line spanning the whole or fraction of the Axes.
771
+
772
+ Note: If you want to set x-limits in data coordinates, use
773
+ `~.Axes.hlines` instead.
771
774
772
775
Parameters
773
776
----------
774
777
y : float, default: 0
775
- y position in data coordinates of the horizontal line .
778
+ y position in :ref:` data coordinates <coordinate-systems>` .
776
779
777
780
xmin : float, default: 0
778
- Should be between 0 and 1, 0 being the far left of the plot, 1 the
779
- far right of the plot.
781
+ The start x-position in :ref:`axes coordinates <coordinate-systems>`.
782
+ Should be between 0 and 1, 0 being the far left of the plot,
783
+ 1 the far right of the plot.
780
784
781
785
xmax : float, default: 1
782
- Should be between 0 and 1, 0 being the far left of the plot, 1 the
783
- far right of the plot.
786
+ The end x-position in :ref:`axes coordinates <coordinate-systems>`.
787
+ Should be between 0 and 1, 0 being the far left of the plot,
788
+ 1 the far right of the plot.
784
789
785
790
Returns
786
791
-------
@@ -836,18 +841,23 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
836
841
@_docstring .dedent_interpd
837
842
def axvline (self , x = 0 , ymin = 0 , ymax = 1 , ** kwargs ):
838
843
"""
839
- Add a vertical line across the Axes.
844
+ Add a vertical line spanning the whole or fraction of the Axes.
845
+
846
+ Note: If you want to set y-limits in data coordinates, use
847
+ `~.Axes.vlines` instead.
840
848
841
849
Parameters
842
850
----------
843
851
x : float, default: 0
844
- x position in data coordinates of the vertical line .
852
+ y position in :ref:` data coordinates <coordinate-systems>` .
845
853
846
854
ymin : float, default: 0
855
+ The start y-position in :ref:`axes coordinates <coordinate-systems>`.
847
856
Should be between 0 and 1, 0 being the bottom of the plot, 1 the
848
857
top of the plot.
849
858
850
859
ymax : float, default: 1
860
+ The end y-position in :ref:`axes coordinates <coordinate-systems>`.
851
861
Should be between 0 and 1, 0 being the bottom of the plot, 1 the
852
862
top of the plot.
853
863
0 commit comments