load_theme

Contents

load_theme#

load_theme(filename)[source]#

Load a theme from a file.

Parameters:
filenamestr

Theme file. Must be json.

Returns:
pyvista.Theme

The loaded theme.

Examples

>>> import pyvista as pv
>>> from pyvista.plotting.themes import DocumentTheme
>>> theme = DocumentTheme()
>>> theme.save('my_theme.json')
>>> loaded_theme = pv.load_theme('my_theme.json')