Chart2D.area#
- Chart2D.area(x, y1, y2=None, color='b', label='')[source]#
Add an area plot to this chart.
- Parameters:
- xarray_like
X coordinates of the points outlining the area to draw.
- y1array_like
Y coordinates of the points on the first outline of the area to draw.
- y2array_like,
optional Y coordinates of the points on the second outline of the area to draw. Defaults to
np.zeros_like(x).- color
ColorLike, default: “b” Color of the area drawn in this plot. Any color parsable by
pyvista.Coloris allowed.- label
str, default: “” Label of this plot, as shown in the chart’s legend.
- Returns:
plotting.charts.AreaPlotThe created area plot.
Examples#
Download Python source code | Download Jupyter notebook
Generate an area plot.
>>> import pyvista as pv
>>> chart = pv.Chart2D()
>>> plot = chart.area([0, 1, 2], [2, 1, 3])
>>> chart.show()
Used In#
Docstring Examples
AreaPlot(1 use)AreaPlot.brush(1 use)AreaPlot.color(1 use)AreaPlot.label(1 use)AreaPlot.line_style(1 use)13 more
AreaPlot.line_width(1 use)AreaPlot.pen(1 use)AreaPlot.toggle(1 use)AreaPlot.update(1 use)AreaPlot.visible(1 use)AreaPlot.x(1 use)AreaPlot.y1(1 use)AreaPlot.y2(1 use)Brush.color(1 use)Brush.texture(1 use)Brush.texture_interpolate(1 use)Brush.texture_repeat(1 use)Chart2D(1 use)
Gallery Examples