Axes.axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs)
[source]
Add a vertical span (rectangle) across the axes.
Draw a vertical span (rectangle) from xmin
to xmax
. With the default values of ymin
= 0 and ymax
= 1. This always spans the yrange, regardless of the ylim settings, even if you change them, e.g., with the set_ylim()
command. That is, the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top but the x location is in data coordinates.
Parameters: |
|
---|---|
Returns: |
|
Other Parameters: |
|
See also
axhspan
Draw a vertical, green, translucent rectangle from x = 1.25 to x = 1.55 that spans the yrange of the axes.
>>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.axvspan.html