pyvista.DataSetMapper#

class DataSetMapper(*args, **kwargs)[source]#

Wrap _vtk.vtkDataSetMapper.

Parameters:
datasetpyvista.DataSet, optional

Dataset to assign to this mapper.

themepyvista.plotting.themes.Theme, optional

Plot-specific theme.

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()
../../../_images/pyvista-DataSetMapper-1_00_00.png

Methods

Attributes

DataSetMapper.array_name

Return or set the array name or number and component to color by.

DataSetMapper.bounds

Return the bounds of this mapper.

DataSetMapper.cmap

Colormap assigned to this mapper.

DataSetMapper.color_mode

Return or set the color mode.

DataSetMapper.dataset

Return or set the dataset assigned to this mapper.

DataSetMapper.interpolate_before_map

Return or set the interpolation of scalars before mapping.

DataSetMapper.lookup_table

Return or set the lookup table.

DataSetMapper.resolve

Set or return the global flag to avoid z-buffer resolution.

DataSetMapper.scalar_map_mode

Return or set the scalar map mode.

DataSetMapper.scalar_range

Return or set the scalar range.

DataSetMapper.scalar_visibility

Return or set the scalar visibility.