set_plot_theme#
- set_plot_theme(theme)[source]#
Set plotting parameters to a predefined theme using a string or
Theme.- Parameters:
- theme
str|Theme Theme to apply. Accepts any of:
A registered theme name. Built-in names include
'dark','default','document','document_build','document_pro','paraview','testing', and'vtk'. Third-party plugins can add more via thepyvista.themesentry-point group. Useregistered_themes()to list everything that is currently available.A
"package.module:ClassName"dotted path to any importableThemesubclass.A
Themeinstance.
- theme
See also
pyvista.registered_themesList all registered theme names.
pyvista.plotting.themes.ThemeBase class. Subclasses with a class-level
_default_nameare discoverable by name; see the class docstring for details aimed at theme authors and plugin packages.
Examples
Set to the default theme.
>>> import pyvista as pv >>> pv.set_plot_theme('default')
Set to the document theme.
>>> pv.set_plot_theme('document')
Set to the dark theme.
>>> pv.set_plot_theme('dark')
Set to the ParaView theme.
>>> pv.set_plot_theme('paraview')
Load a theme from any importable module using a dotted path.
>>> pv.set_plot_theme('pyvista.plotting.themes:DarkTheme')