@@ -799,13 +799,6 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
799
799
"""
800
800
Add a horizontal span (rectangle) across the axis.
801
801
802
- Call signature::
803
-
804
- axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
805
-
806
- *y* coords are in data units and *x* coords are in axes (relative
807
- 0-1) units.
808
-
809
802
Draw a horizontal span (rectangle) from *ymin* to *ymax*.
810
803
With the default values of *xmin* = 0 and *xmax* = 1, this
811
804
always spans the xrange, regardless of the xlim settings, even
@@ -814,22 +807,35 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
814
807
0.5=middle, 1.0=right but the *y* location is in data
815
808
coordinates.
816
809
817
- Return value is a :class:`matplotlib.patches.Polygon`
818
- instance.
819
-
820
- Examples:
821
-
822
- * draw a gray rectangle from *y* = 0.25-0.75 that spans the
823
- horizontal extent of the axes::
810
+ Parameters
811
+ ----------
812
+ ymin : float
813
+ Lower limit of the horizontal span in data units.
814
+ ymax : float
815
+ Upper limit of the horizontal span in data units.
816
+ xmin : float, optional, default: 0
817
+ Lower limit of the vertical span in axes (relative
818
+ 0-1) units.
819
+ xmax : float, optional, default: 1
820
+ Upper limit of the vertical span in axes (relative
821
+ 0-1) units.
824
822
825
- >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
823
+ Returns
824
+ -------
825
+ Polygon : `~matplotlib.patches.Polygon`
826
826
827
- Valid kwargs are :class:`~matplotlib.patches.Polygon` properties:
827
+ Other Parameters
828
+ ----------------
829
+ kwargs : `~matplotlib.patches.Polygon` properties.
828
830
829
831
%(Polygon)s
830
832
831
- **Example:**
833
+ See Also
834
+ --------
835
+ axvspan : Add a vertical span (rectangle) across the axes.
832
836
837
+ Examples
838
+ --------
833
839
.. plot:: mpl_examples/pylab_examples/axhspan_demo.py
834
840
835
841
"""
0 commit comments