fill_betweenx
- mdtools.plot.fill_betweenx(ax, y, x1, x2=0, xmin=None, xmax=None, ymin=None, ymax=None, logx=False, logy=False, xlabel='$x$', ylabel='$y$', legend_loc='best', **kwargs)[source]
Fill the area between two vertical curves x1 and x2 using
matplotlib.axes.Axes.fill_betweenx().Deprecated since version 0.0.0.dev2: Use
matplotlib.axes.Axes.fill_betweenx(),matplotlib.axes.Axes.set()andmatplotlib.axes.Axes.legend()directly.- Parameters:
ax (
matplotlib.axes.Axes) – The axes to draw to.y (
array_like) – One dimensional array containing the y data.x1 (
array_like) – Array of the same shape as y containing the first x data.x2 (
array_like) – Array of the same shape as y containing the second x data. Default: 0xmin (
scalar, optional) – Left limit for plotting on x-axis. The left limit may be greater than the right limit, in which case the tick values will show up in decreasing order. Default isNone, which means set the limit automatically.xmax (
scalar, optional) – Right limit for plotting on x-axis.ymin, ymax (
scalar, optional) – Same as xmin and xmax, but for the y-axis.logx (
bool, optional) – Use logarithmic x scale.logy (
bool, optional) – Same as logx, but for the y-axis.xlabel (
str, optional) – Label for the x-axis.ylabel (
str, optional) – Label for the y-axis.legend_loc (
intorstr, optional) – Position of the legend. Seematplotlib.pyplot.legend()for possible arguments.kwargs (
dict, optional) – Keyword arguments to pass tomatplotlib.axes.Axes.fill_betweenx(). See there for possible keyword arguments.
- Returns:
img (
matplotlib.collections.PolyCollection) – Amatplotlib.collections.PolyCollection.