LinePlot2D.update#
- LinePlot2D.update(x, y) None[source]#
Update this plot’s points, through which a line is drawn.
- Parameters:
- xarray_like
The new x coordinates of the points through which a line should be drawn.
- yarray_like
The new y coordinates of the points through which a line should be drawn.
Examples#
Download Python source code | Download Jupyter notebook
Create a line plot.
>>> import pyvista as pv
>>> chart = pv.Chart2D()
>>> plot = chart.line([0, 1, 2], [2, 1, 3])
>>> chart.show()
Update the line’s y coordinates.
>>> plot.update([0, 1, 2], [3, 1, 2])
>>> chart.show()