reservoirflow.utils.pyvista.get_colormap#
- reservoirflow.utils.pyvista.get_colormap(cmap: str, gamma: float, n_colors: int)#
Get colormap for a pyvista plotter from plt.cm
- Parameters:
cmap (str, optional) – color map name based on Matplotlib, see Choosing Colormaps in Matplotlib.
gamma (float, optional) – shift color map distribution to left when values less than 1 and to right when values larger than 1. In case of qualitative colormaps, this argument is ignored.
n_colors (int, optional) – number of colors. In case of qualitative colormaps, n_colors should not exceed the total number of available colors (e.g. 10 for cmap=”tab10” and 20 for cmap=”tab20”).
- Returns:
color map as a cm object from plt (matplotlib.pyplot).
- Return type:
plt.cm