@@ -862,39 +862,50 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
862
862
"""
863
863
Add a vertical span (rectangle) across the axes.
864
864
865
- Call signature::
866
-
867
- axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
868
-
869
- *x* coords are in data units and *y* coords are in axes (relative
870
- 0-1) units.
871
-
872
- Draw a vertical span (rectangle) from *xmin* to *xmax*. With
873
- the default values of *ymin* = 0 and *ymax* = 1, this always
865
+ Draw a vertical span (rectangle) from `xmin` to `xmax`. With
866
+ the default values of `ymin` = 0 and `ymax` = 1. This always
874
867
spans the yrange, regardless of the ylim settings, even if you
875
868
change them, e.g., with the :meth:`set_ylim` command. That is,
876
869
the vertical extent is in axes coords: 0=bottom, 0.5=middle,
877
- 1.0=top but the *y* location is in data coordinates.
878
-
879
- Return value is the :class:`matplotlib.patches.Polygon`
880
- instance.
870
+ 1.0=top but the y location is in data coordinates.
881
871
882
- Examples:
872
+ Parameters
873
+ ----------
874
+ xmin : scalar
875
+ Number indicating the first X-axis coordinate of the vertical
876
+ span rectangle in data units.
877
+ xmax : scalar
878
+ Number indicating the second X-axis coordinate of the vertical
879
+ span rectangle in data units.
880
+ ymin : scalar, optional
881
+ Number indicating the first Y-axis coordinate of the vertical
882
+ span rectangle in relative Y-axis units (0-1). Default to 0.
883
+ ymax : scalar, optional
884
+ Number indicating the second Y-axis coordinate of the vertical
885
+ span rectangle in relative Y-axis units (0-1). Default to 1.
883
886
884
- * draw a vertical green translucent rectangle from x=1.25 to 1.55 that
885
- spans the yrange of the axes::
887
+ Returns
888
+ -------
889
+ rectangle : matplotlib.patches.Polygon
890
+ Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax).
886
891
887
- >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
892
+ Other Parameters
893
+ ----------------
894
+ **kwargs
895
+ Optional parameters are properties of the class
896
+ matplotlib.patches.Polygon.
888
897
889
- Valid kwargs are :class:`~matplotlib.patches.Polygon`
890
- properties:
898
+ See Also
899
+ --------
900
+ axhspan
891
901
892
- %(Polygon)s
902
+ Examples
903
+ --------
904
+ Draw a vertical, green, translucent rectangle from x = 1.25 to
905
+ x = 1.55 that spans the yrange of the axes.
893
906
894
- .. seealso::
907
+ >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
895
908
896
- :meth:`axhspan`
897
- for example plot and source code
898
909
"""
899
910
trans = self .get_xaxis_transform (which = 'grid' )
900
911
0 commit comments