toggle#

ChartMPL.toggle()#

Toggle the chart’s visibility.

Examples

Create a matplotlib chart.

>>> import pyvista
>>> chart = pyvista.ChartMPL()
>>> plots = chart.figure.axes[0].plot([0, 1, 2], [2, 1, 3])
>>> chart.show()
../../../../_images/pyvista-ChartMPL-toggle-1_01_00.png

Hide it.

>>> chart.toggle()
>>> chart.show()
../../../../_images/pyvista-ChartMPL-toggle-1_02_00.png