pyvista.Chart2D.background_color#

property Chart2D.background_color[source]#

Return or set the chart’s background color.

Examples

Create a 2D chart with a green background.

>>> import pyvista as pv
>>> chart = pv.Chart2D()
>>> plot = chart.line([0, 1, 2], [2, 1, 3])
>>> chart.background_color = (0.5, 0.9, 0.5)
>>> chart.show(interactive=False)
../../../../_images/pyvista-Chart2D-background_color-2_00_00.png