pyvista.DataSetMapper.set_custom_opacity#
- DataSetMapper.set_custom_opacity(opacity, color, n_colors, preference='point')[source]#
Set custom opacity.
- Parameters:
- opacity
numpy.ndarray Opacity array to color the dataset. Array length must match either the number of points or cells.
- color
pyvista.ColorLike The color to use with the opacity array.
- n_colors
int Number of colors to use.
- preference
str, default: ‘point’ Either
'point'or'cell'. Used when the number of cells matches the number of points.
- opacity