pyvista.ChartMPL.active_background_color#

property ChartMPL.active_background_color[source]#

Return or set the chart’s background color in interactive mode.

Examples

Create a matplotlib chart with a green background.

>>> import pyvista as pv
>>> chart = pv.ChartMPL()
>>> plots = chart.figure.axes[0].plot([0, 1, 2], [2, 1, 3])
>>> chart.background_color = (0.5, 0.9, 0.5)
>>> chart.show(interactive=False)
https://d33wubrfki0l68.cloudfront.net/001945f961365b4825edbdfa543882da50fcd5bb/e6d95/_images/pyvista-chartmpl-active_background_color-2_01_00.png

Set the active background color to blue and activate the chart.

>>> chart.active_background_color = 'b'
>>> chart.show(interactive=True)
https://d33wubrfki0l68.cloudfront.net/80efec1ccd9fe1a4742dc8f764214de5ad111d1a/f8dea/_images/pyvista-chartmpl-active_background_color-2_02_00.png