LookupTable.hue_range

Contents

LookupTable.hue_range#

property LookupTable.hue_range: tuple[float, float] | None[source]#

Return or set the hue range.

This range is only used when creating custom color maps and will return None when a color map has been set with LookupTable.cmap.

This will clear any existing color map and create new values for the lookup table when set.

Examples#

Download Python source code | Download Jupyter notebook

Set the hue range. This allows you to create a lookup table without setting a color map.

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> lut.hue_range = (0, 0.1)
>>> lut.plot()
../../../_images/pyvista-LookupTable-hue_range-4c7828c2cdcb497d_00_00.png

Create a different color map.

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> lut.hue_range = (0.5, 0.8)
>>> lut.plot()
../../../_images/pyvista-LookupTable-hue_range-4c7828c2cdcb497d_01_00.png