pyvista.plotting.themes.Theme

Contents

pyvista.plotting.themes.Theme#

class Theme[source]#

Base VTK theme.

Examples

Change the global default background color to white.

>>> import pyvista as pv
>>> pv.global_theme.color = 'white'

Show edges by default.

>>> pv.global_theme.show_edges = True

Create a new theme from the default theme and apply it globally.

>>> from pyvista.plotting.themes import DocumentTheme
>>> my_theme = DocumentTheme()
>>> my_theme.color = 'red'
>>> my_theme.background = 'white'
>>> pv.global_theme.load_theme(my_theme)

Methods

Theme.load_theme(theme)

Overwrite the current theme with a theme.

Theme.restore_defaults()

Restore the theme defaults.

Theme.save(filename)

Serialize this theme to a json file.

Attributes

Theme.above_range_color

Return or set the default above range color.

Theme.allow_empty_mesh

Return or set whether to allow plotting empty meshes.

Theme.anti_aliasing

Enable or disable anti-aliasing.

Theme.auto_close

Automatically close the figures when finished plotting.

Theme.axes

Return or set the default axes configuration.

Theme.background

Return or set the default background color of pyvista plots.

Theme.before_close_callback

Return the default before_close_callback function for Plotter.

Theme.below_range_color

Return or set the default below range color.

Theme.camera

Return or set the default camera position.

Theme.cmap

Return or set the default colormap of pyvista.

Theme.color

Return or set the default color of meshes in pyvista.

Theme.color_cycler

Return or set the default color cycler used to color meshes.

Theme.colorbar_horizontal

Return or set the default parameters of a horizontal colorbar.

Theme.colorbar_orientation

Return or set the default colorbar orientation.

Theme.colorbar_vertical

Return or set the default parameters of a vertical colorbar.

Theme.depth_peeling

Return or set the default depth peeling parameters.

Theme.edge_color

Return or set the default edge color.

Theme.edge_opacity

Return or set the edges opacity.

Theme.enable_camera_orientation_widget

Enable the camera orientation widget in all plotters.

Theme.floor_color

Return or set the default floor color.

Theme.font

Return or set the default font size, family, and/or color.

Theme.full_screen

Return if figures are shown in full screen.

Theme.hidden_line_removal

Return or set hidden line removal.

Theme.image_scale

Return or set the default image scale factor.

Theme.interactive

Return or set the default interactive parameter.

Theme.interpolate_before_map

Return or set whether to interpolate colors before mapping.

Theme.jupyter_backend

Return or set the jupyter notebook plotting backend.

Theme.lighting

Return or set the default lighting.

Theme.lighting_params

Return or set the default lighting configuration.

Theme.line_width

Return or set the default line width.

Theme.logo_file

Return or set the logo file.

Theme.multi_rendering_splitting_position

Return or set the default multi_rendering_splitting_position parameter.

Theme.multi_samples

Return or set the default multi_samples parameter.

Theme.name

Return or set the name of the theme.

Theme.nan_color

Return or set the default NaN color.

Theme.notebook

Return or set the state of notebook plotting.

Theme.opacity

Return or set the opacity.

Theme.outline_color

Return or set the default outline color.

Theme.point_size

Return or set the default point size.

Theme.render_lines_as_tubes

Return or set the default render_lines_as_tubes parameter.

Theme.render_points_as_spheres

Return or set the default render_points_as_spheres parameter.

Theme.return_cpos

Return or set the default behavior of returning the camera position.

Theme.sharp_edges_feature_angle

Set or return the angle of the sharp edges feature angle.

Theme.show_edges

Return or set the default edge visibility.

Theme.show_scalar_bar

Return or set the default color bar visibility.

Theme.show_vertices

Return or set the default vertex visibility.

Theme.silhouette

Return or set the default silhouette configuration.

Theme.slider_styles

Return the default slider style configurations.

Theme.smooth_shading

Return or set the default smooth_shading parameter.

Theme.split_sharp_edges

Set or return splitting sharp edges.

Theme.title

Return or set the default title parameter.

Theme.trame

Return or set the default trame parameters.

Theme.transparent_background

Return or set the default transparent_background parameter.

Theme.volume_mapper

Return or set the default volume_mapper parameter.

Theme.window_size

Return or set the default render window size.