pyvista.LookupTable.values#

property LookupTable.values: lookup_table_ndarray[source]#

Return or set the lookup table values.

This attribute is used when creating a custom lookup table. The table must be a RGBA array shaped (n, 4).

Examples

Create a simple four value lookup table ranging from black to red.

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> lut.values = [
...     [0, 0, 0, 255],
...     [85, 0, 0, 255],
...     [170, 0, 0, 255],
...     [255, 0, 0, 255],
... ]
>>> lut.values
lookup_table_ndarray([[  0,   0,   0, 255],
                      [ 85,   0,   0, 255],
                      [170,   0,   0, 255],
                      [255,   0,   0, 255]], dtype=uint8)
>>> lut.plot()
../../../_images/pyvista-LookupTable-values-1_00_00.png