| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.fill_betweenx.html | [Back] [Original] |
Section Navigation
matplotlibmatplotlib.animationmatplotlib.artistmatplotlib.axesmatplotlib.axismatplotlib.backend_basesmatplotlib.backend_managersmatplotlib.backend_toolsmatplotlib.backendsmatplotlib.backends.backend_mixedmatplotlib.backends.backend_templatematplotlib.backends.backend_aggmatplotlib.backends.backend_cairomatplotlib.backends.backend_gtk3agg, matplotlib.backends.backend_gtk3cairomatplotlib.backends.backend_gtk4agg, matplotlib.backends.backend_gtk4cairomatplotlib.backends.backend_nbaggmatplotlib.backends.backend_pdfmatplotlib.backends.backend_pgfmatplotlib.backends.backend_psmatplotlib.backends.registrymatplotlib.backends.backend_qtagg, matplotlib.backends.backend_qtcairomatplotlib.backends.backend_svgmatplotlib.backends.backend_tkagg, matplotlib.backends.backend_tkcairomatplotlib.backends.backend_webagg_corematplotlib.backends.backend_webaggmatplotlib.backends.backend_wxagg, matplotlib.backends.backend_wxcairomatplotlib.beziermatplotlib.categorymatplotlib.cbookmatplotlib.cmmatplotlib.collectionsmatplotlib.colorbarmatplotlib.colorizermatplotlib.colorsmatplotlib.containermatplotlib.contourmatplotlib.datesmatplotlib.dvireadmatplotlib.figurematplotlib.font_managermatplotlib.ft2fontmatplotlib.gridspec
matplotlib.hatchmatplotlib.imagematplotlib.insetmatplotlib.layout_enginematplotlib.legendmatplotlib.legend_handlermatplotlib.lines
matplotlib.markers
matplotlib.mathtextmatplotlib.mlabmatplotlib.offsetboxmatplotlib.patchesmatplotlib.pathmatplotlib.patheffectsmatplotlib.pyplotmatplotlib.projections
matplotlib.quiver
matplotlib.rcsetupmatplotlib.sankeymatplotlib.scalematplotlib.sphinxext.mathmplmatplotlib.sphinxext.plot_directivematplotlib.sphinxext.figmpl_directivematplotlib.sphinxext.rolesmatplotlib.spinesmatplotlib.stylematplotlib.tablematplotlib.testingmatplotlib.textmatplotlib.texmanagermatplotlib.tickermatplotlib.transformsmatplotlib.trimatplotlib.typingmatplotlib.unitsmatplotlib.widgetsmatplotlib._afmmatplotlib._apimatplotlib._docstringmatplotlib._enumsmatplotlib._type1fontmatplotlib._tight_bboxmatplotlib._tight_layoutmpl_toolkits.mplot3dmpl_toolkits.axes_grid1mpl_toolkits.axisartistpylabmatplotlib.pyplotFill the area between two vertical curves.
The curves are defined by the points (y, x1) and (y, x2). This creates one or multiple polygons describing the filled area.
You may exclude some vertical sections from filling using where.
By default, the edges connect the given points directly. Use step if the filling should be a step function, i.e. constant in between y.
The y coordinates of the nodes defining the curves.
The x coordinates of the nodes defining the first curve.
The x coordinates of the nodes defining the second curve.
Define where to exclude some vertical regions from being filled.
The filled regions are defined by the coordinates y[where].
More precisely, fill between y[i] and y[i+1] if
where[i] and where[i+1]. Note that this definition implies
that an isolated True value between two False values in where
will not result in filling. Both sides of the True position
remain unfilled due to the adjacent False values.
This option is only relevant if where is used and the two curves are crossing each other.
Semantically, where is often used for x1 > x2 or similar. By default, the nodes of the polygon defining the filled region will only be placed at the positions in the y array. Such a polygon cannot describe the above semantics close to the intersection. The y-sections containing the intersection are simply clipped.
Setting interpolate to True will calculate the actual intersection point and extend the filled region up to this point.
Define step if the filling should be a step function, i.e. constant in between y. The value determines where the step will occur:
'pre': The x value is continued constantly to the left from
every y position, i.e. the interval (y[i-1], y[i]]
has the value x[i].
'post': The y value is continued constantly to the right from
every y position, i.e. the interval [y[i], y[i+1])
has the value x[i].
'mid': Steps occur half-way between the y positions.
FillBetweenPolyCollectionA FillBetweenPolyCollection containing the plotted polygons.
If given, the following parameters also accept a string s, which is
interpreted as data[s] if s is a key in data:
y, x1, x2, where
All other keyword arguments are passed on to
FillBetweenPolyCollection. They control the Polygon properties:
Property |
Description |
|---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image |
|
array-like or float or None |
|
bool |
|
|
bool or list of bools |
array-like or None |
|
|
|
(vmin: float, vmax: float) |
|
|
|
bool |
|
Patch or (Path, Transform) or None |
|
|
|
color or list of RGBA tuples |
|
array-like |
|
|
|
|
|
str |
|
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} |
|
unknown |
|
bool |
|
|
|
object |
|
|
{'-', '--', '-.', ':', '', ...} or (offset, on-off-seq) or list thereof |
|
float or list of floats |
bool |
|
|
|
(N, 2) or (2,) array-like |
|
list of |
|
list of array-like |
|
None or bool or float or callable |
|
float |
|
bool |
|
|
|
(scale: float, length: float, randomness: float) |
|
bool or None |
|
str |
|
list of str or None |
|
list of array-like |
|
unknown |
|
bool |
|
float |
See also
fill_betweenFill between two sets of y-values.
fill_betweenxFill between two sets of x-values.
Notes
Note
This is the pyplot wrapper for axes.Axes.fill_betweenx.
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |