pyvista.plotting.charts.AreaPlot.update#

AreaPlot.update(x, y1, y2=None)[source]#

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. Default numpy.zeros_like(x).

Examples

Create an area plot.

>>> import pyvista as pv
>>> chart = pv.Chart2D()
>>> plot = chart.area([0, 1, 2], [2, 1, 3])
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/848de5c6f39bc345ed92c6713479593ddbc45ed3/b0f45/_images/pyvista-plotting-charts-areaplot-update-2_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()
https://d33wubrfki0l68.cloudfront.net/6436c43a742558e4f39a075bffa39e303a0b1d81/d0135/_images/pyvista-plotting-charts-areaplot-update-2_01_00.png