Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 63f46e9

Browse files
committed
DOC change axhspan to numpydoc format
1 parent 5f553bc commit 63f46e9

1 file changed

Lines changed: 23 additions & 19 deletions

File tree

lib/matplotlib/axes/_axes.py

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -801,13 +801,6 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
801801
"""
802802
Add a horizontal span (rectangle) across the axis.
803803
804-
Call signature::
805-
806-
axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
807-
808-
*y* coords are in data units and *x* coords are in axes (relative
809-
0-1) units.
810-
811804
Draw a horizontal span (rectangle) from *ymin* to *ymax*.
812805
With the default values of *xmin* = 0 and *xmax* = 1, this
813806
always spans the xrange, regardless of the xlim settings, even
@@ -816,22 +809,33 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
816809
0.5=middle, 1.0=right but the *y* location is in data
817810
coordinates.
818811
819-
Return value is a :class:`matplotlib.patches.Polygon`
820-
instance.
821-
822-
Examples:
823-
824-
* draw a gray rectangle from *y* = 0.25-0.75 that spans the
825-
horizontal extent of the axes::
826-
827-
>>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
812+
Parameters
813+
----------
814+
ymin : float
815+
Lower limit of the horizontal span in data units.
816+
ymax : float
817+
Upper limit of the horizontal span in data units.
818+
xmin : float, optional, default: 0
819+
Lower limit of the vertical span in axes (relative
820+
0-1) units.
821+
xmax : float, optional, default: 1
822+
Upper limit of the vertical span in axes (relative
823+
0-1) units.
828824
829-
Valid kwargs are :class:`~matplotlib.patches.Polygon` properties:
825+
Returns
826+
-------
827+
Polygon : `~matplotlib.patches.Polygon`
830828
831-
%(Polygon)s
829+
Other Parameters
830+
----------------
831+
kwargs : `~matplotlib.patches.Polygon` properties.
832832
833-
**Example:**
833+
See Also
834+
--------
835+
axvspan : Add a vertical span (rectangle) across the axes.
834836
837+
Examples
838+
--------
835839
.. plot:: mpl_examples/pylab_examples/axhspan_demo.py
836840
837841
"""

0 commit comments

Comments
 (0)