DataSetMapper#

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

Wrap vtkDataSetMapper.

Parameters:
datasetpyvista.DataSet, optional

Dataset to assign to this mapper.

themepyvista.plotting.themes.Theme, optional

Plot-specific theme.

Examples#

Download Python source code | Download Jupyter notebook

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-fe8cf2f6141144bf_00_00.png

Inherited Attributes#

_BaseDataSetMapper.array_name

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

_BaseMapper.bounds

Return the bounds of this mapper.

_BoundsSizeMixin.bounds_size

Return the size of each axis of the object’s bounding box.

_BaseMapper.center

Return the center of mapper.

_BaseDataSetMapper.cmap

Colormap assigned to this mapper.

_BaseMapper.color_mode

Return or set the color mode.

_BaseDataSetMapper.dataset

Return or set the dataset assigned to this mapper.

_BaseMapper.interpolate_before_map

Return or set the interpolation of scalars before mapping.

_BaseMapper.lookup_table

Return or set the lookup table.

_BaseDataSetMapper.resolve

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

_BaseMapper.scalar_map_mode

Return or set the scalar map mode.

_BaseDataSetMapper.scalar_range

Return or set the scalar range.

_BaseMapper.scalar_visibility

Return or set the scalar visibility.

_BaseMapper.static

Return or set whether the mapper treats its input as static.

Inherited Methods#

_BaseDataSetMapper.as_rgba

Convert the active scalars to RGBA.

_BaseDataSetMapper.clear_active_scalars

Detach the active scalars algorithm, if any.

_BaseDataSetMapper.copy

Create a copy of this mapper.

_BaseDataSetMapper.set_active_scalars

Set the active scalars for this mapper without mutating its dataset.

_BaseDataSetMapper.set_custom_opacity

Set custom opacity.

_BaseDataSetMapper.set_scalars

Set the scalars on this mapper.

_BaseMapper.update

Update this mapper.