_BaseDataSetMapper.set_active_scalars

_BaseDataSetMapper.set_active_scalars#

_BaseDataSetMapper.set_active_scalars(
name: str,
preference: PointLiteral | CellLiteral = 'point',
) None[source]#

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

Inserts an ActiveScalarsAlgorithm between the mapper’s current input and the mapper itself. The algorithm sets the active scalars on a shallow copy of the input data, so the original dataset is never mutated and the same dataset can be shared across multiple mappers with different active scalars.

If an algorithm is already in place, it is updated in place.

Parameters:
namestr

Name of the scalars array to set as active.

preferencestr, default: ‘point’

Either 'point' or 'cell'.

See Also#

clear_active_scalars
set_scalars