pyvista.Plotter.theme#
- property Plotter.theme: Theme[source]#
 Return or set the theme used for this plotter.
Deprecated since version 0.47: Assigning the
themeattribute to a plotter object does not affect global appearance settings such asbackground, which are set at instantiation. To this respect, you need to set the theme such that:import pyvista as pv pl = pv.Plotter() pl.theme = theme # change above lines to pl = pv.Plotter(theme=theme)
However, actor appearance settings such as
edge_colorfor example are correctly taken into account.- Returns:
 pyvista.ThemeTheme of this plotter.
Examples
Use the dark theme for a plotter.
>>> import pyvista as pv >>> from pyvista import themes >>> pl = pv.Plotter() >>> pl.theme = themes.DarkTheme() >>> actor = pl.add_mesh(pv.Sphere()) >>> pl.show()