pyvista.plotting.charts.PiePlot.toggle

Contents

pyvista.plotting.charts.PiePlot.toggle#

PiePlot.toggle() None[source]#

Toggle the plot’s visibility.

Examples

Create a pie plot.

>>> import pyvista as pv
>>> chart = pv.ChartPie([4, 3, 2, 1])
>>> plot = chart.plot
>>> chart.show()
../../../../_images/pyvista-plotting-charts-PiePlot-toggle-2_00_00.png

Hide it.

>>> plot.toggle()
>>> chart.show()
../../../../_images/pyvista-plotting-charts-PiePlot-toggle-2_01_00.png