pyvista.DataSetMapper#
- class DataSetMapper(dataset: Optional[DataSet] = None, theme: Optional[DefaultTheme] = None)[source]#
Wrap _vtk.vtkDataSetMapper.
- Parameters:
- dataset
pyvista.DataSet
,optional
Dataset to assign to this mapper.
- theme
pyvista.themes.DefaultTheme
,optional
Plot-specific theme.
- dataset
Examples
Create a mapper outside
pyvista.Plotter
and assign it to an actor.>>> import pyvista as pv >>> mesh = pv.Cube() >>> mapper = pv.DataSetMapper(dataset=mesh) >>> actor = pv.Actor(mapper=mapper) >>> actor.plot()
Methods
Convert the active scalars to RGBA.
DataSetMapper.set_custom_opacity
(opacity, ...)Set custom opacity.
DataSetMapper.set_scalars
(scalars, scalars_name)Set the scalars on this mapper.
Attributes
Colormap assigned to this mapper.
Return or set the dataset assigned to this mapper.