pyvista.LookupTable.apply_cmap#
- LookupTable.apply_cmap(cmap, n_values: int = 256, flip: bool = False)[source]#
Assign a colormap to this lookup table.
This can be used instead of
LookupTable.cmap
when you need to set the number of values at the same time as the color map.- Parameters:
Examples
Apply
matplotlib
’s'cividis'
color map.>>> import pyvista as pv >>> lut = pv.LookupTable() >>> lut.apply_cmap('cividis', n_values=32) >>> lut.plot()