pyvista.LookupTable.to_opacity_tf#

LookupTable.to_opacity_tf(
clamping: bool = True,
) vtkPiecewiseFunction[source]#

Return the opacity transfer function of this table.

Parameters:
clampingbool, optional

When zero range clamping is False, values returns 0.0 when a value is requested outside of the points specified.

Added in version 0.44.

Returns:
vtk.vtkPiecewiseFunction

Piecewise function of the opacity of this color table.

Examples

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> tf = lut.to_opacity_tf()
>>> tf
<vtkmodules.vtkCommonDataModel.vtkPiecewiseFunction(...) at ...>