8000 Merge pull request #7037 from maluethi/doc · timhoffm/matplotlib@0234978 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0234978

Browse files
committed
Merge pull request matplotlib#7037 from maluethi/doc
DOC: change axhspan to numpydoc format
1 parent a2e56ad commit 0234978

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -799,13 +799,6 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
799799
"""
800800
Add a horizontal span (rectangle) across the axis.
801801
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-
809802
Draw a horizontal span (rectangle) from *ymin* to *ymax*.
810803
With the default values of *xmin* = 0 and *xmax* = 1, this
811804
always spans the xrange, regardless of the xlim settings, even
@@ -814,22 +807,35 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
814807
0.5=middle, 1.0=right but the *y* location is in data
815808
coordinates.
816809
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.
824822
825-
>>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
823+
Returns
824+
-------
825+
Polygon : `~matplotlib.patches.Polygon`
826826
827-
Valid kwargs are :class:`~matplotlib.patches.Polygon` properties:
827+
Other Parameters
828+
----------------
829+
kwargs : `~matplotlib.patches.Polygon` properties.
828830
829831
%(Polygon)s
830832
831-
**Example:**
833+
See Also
834+
--------
835+
axvspan : Add a vertical span (rectangle) across the axes.
832836
837+
Examples
838+
--------
833839
.. plot:: mpl_examples/pylab_examples/axhspan_demo.py
834840
835841
"""

0 commit comments

Comments
 (0)
0