pyvista.ChartBox.toggle#

ChartBox.toggle()[source]#

Toggle the chart’s visibility.

Examples

Create a boxplot chart.

>>> import pyvista as pv
>>> chart = pv.ChartBox([[0, 1, 1, 2, 3, 3, 4]])
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/c11fc5c93247d9b30facb770635b53e2f1b721b2/6512a/_images/pyvista-chartbox-toggle-2_00_00.png

Hide it.

>>> chart.toggle()
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/8d857d80b4aa52de3ad5db22f6e1210632178bb4/0dc3f/_images/pyvista-chartbox-toggle-2_01_00.png