remove_plot#

Chart2D.remove_plot(plot)[source]#

Remove the given plot from this chart.

Parameters
plotplotting.charts.ScatterPlot2D, plotting.charts.LinePlot2D, plotting.charts.AreaPlot, plotting.charts.BarPlot or plotting.charts.StackPlot

The plot to remove.

Examples

Create a 2D chart with a line and scatter plot.

>>> import pyvista
>>> chart = pyvista.Chart2D()
>>> scatter_plot, line_plot = chart.plot([0, 1, 2], [2, 1, 3], "o-")
>>> chart.show()
../../../../_images/pyvista-Chart2D-remove_plot-1_01_00.png

Remove the scatter plot from the chart.

>>> chart.remove_plot(scatter_plot)
>>> chart.show()
../../../../_images/pyvista-Chart2D-remove_plot-1_02_00.png