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