pyvista.LookupTable.cmap

Contents

pyvista.LookupTable.cmap#

property LookupTable.cmap: str | None[source]#

Return or set the color map used by this lookup table.

Examples

Apply the single Matplotlib color map "Oranges".

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> lut.cmap = 'Oranges'
>>> lut.plot()
../../../_images/pyvista-LookupTable-cmap-1_00_00.png

Apply a list of colors as a colormap.

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> lut.cmap = ['black', 'red', 'orange']
>>> lut.plot()
../../../_images/pyvista-LookupTable-cmap-1_01_00.png