pyvista.themes._SliderConfig

class _SliderConfig

PyVista configuration encompassing all slider styles.

Examples

Set the classic slider configuration.

>>> import pyvista
>>> pyvista.global_theme.slider_styles.classic.slider_length = 0.02
>>> pyvista.global_theme.slider_styles.classic.slider_width = 0.04
>>> pyvista.global_theme.slider_styles.classic.slider_color = (0.5, 0.5, 0.5)
>>> pyvista.global_theme.slider_styles.classic.tube_width = 0.005
>>> pyvista.global_theme.slider_styles.classic.tube_color = (1, 1, 1)
>>> pyvista.global_theme.slider_styles.classic.cap_opacity = 1
>>> pyvista.global_theme.slider_styles.classic.cap_length = 0.01
>>> pyvista.global_theme.slider_styles.classic.cap_width = 0.02

Set the modern slider configuration.

>>> pyvista.global_theme.slider_styles.modern.slider_length = 0.02
>>> pyvista.global_theme.slider_styles.modern.slider_width = 0.04
>>> pyvista.global_theme.slider_styles.modern.slider_color = (0.43, 0.44, 0.45)
>>> pyvista.global_theme.slider_styles.modern.tube_width = 0.04
>>> pyvista.global_theme.slider_styles.modern.tube_color = (0.69, 0.70, 0.709)
>>> pyvista.global_theme.slider_styles.modern.cap_opacity = 0
>>> pyvista.global_theme.slider_styles.modern.cap_length = 0.01
>>> pyvista.global_theme.slider_styles.modern.cap_width = 0.02

Methods

_SliderConfig.from_dict(dict_)

Create from a dictionary.

_SliderConfig.to_dict()

Return theme config parameters as a dictionary.

Attributes

_SliderConfig.classic

Return the Classic slider configuration.

_SliderConfig.modern

Return the Modern slider configuration.