pyvista.LookupTable.n_values#

property LookupTable.n_values: int[source]#

Return or set the number of values in the lookup table.

Examples

Plot the "reds" colormap with 10 values.

>>> import pyvista as pv
>>> lut = pv.LookupTable('reds')
>>> lut.n_values = 10
>>> lut.plot()
../../../_images/pyvista-LookupTable-n_values-1_00_00.png

Plot the default colormap with 1024 values.

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> lut.n_values = 1024
>>> lut.plot()
../../../_images/pyvista-LookupTable-n_values-1_01_00.png