pyvista.plotting.themes.Theme.save#
- Theme.save(filename: str) None[source]#
Serialize this theme to a json file.
before_close_callbackis non-serializable and is omitted.- Parameters:
- filename
str Path to save the theme to. Should end in
'.json'.
- filename
Examples
Export and then load back in a theme.
>>> import pyvista as pv >>> theme = pv.themes.DocumentTheme() >>> theme.background = 'white' >>> theme.save('my_theme.json') >>> loaded_theme = pv.load_theme('my_theme.json')