update

AreaPlot.update(x, y1, y2=None)

Update this plot’s points, outlining the area to draw.

Parameters
xarray_like

The new x coordinates of the points outlining the area.

y1array_like

The new y coordinates of the points on the first outline of the area.

y2array_like, optional

The new y coordinates of the points on the second outline of the area. Defaults to a sequence of zeros.

Examples

Create an area plot.

>>> import pyvista
>>> chart = pyvista.Chart2D()
>>> plot = chart.area([0, 1, 2], [2, 1, 3])
>>> chart.show()
../../../../_images/pyvista-plotting-charts-AreaPlot-update-1_00_00.png

Update the points on the second outline of the area.

>>> plot.update([0, 1, 2], [2, 1, 3], [1, 0, 1])
>>> chart.show()
../../../../_images/pyvista-plotting-charts-AreaPlot-update-1_01_00.png