_BaseDataSetMapper.set_custom_opacity

_BaseDataSetMapper.set_custom_opacity#

_BaseDataSetMapper.set_custom_opacity(
opacity: NDArray[np.floating],
*,
color: ColorLike,
n_colors: int,
preference: PointLiteral | CellLiteral = 'point',
) → None[source]#

Set custom opacity.

Parameters:
opacitynumpy.ndarray

Opacity array to color the dataset. Array length must match either the number of points or cells.

colorColorLike

The color to use with the opacity array.

n_colorsint

Number of colors to use.

preferencestr, default: ‘point’

Either 'point' or 'cell'. Used when the number of cells matches the number of points.