PetscDrawUtilitySetCmap#
Populate the RGB entries of a colormap from a named palette, honoring options-database overrides for the colormap name, reversal, and brightness.
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscDrawUtilitySetCmap(const char colormap[], int mapsize, unsigned char R[], unsigned char G[], unsigned char B[])
Not Collective
Input Parameters#
colormap - the name of the colormap (e.g.
"hue","gray","jet","viridis"), orNULL/empty for the defaultmapsize - the number of colormap entries to fill
Output Parameters#
R - the red channel of length
mapsizeG - the green channel of length
mapsizeB - the blue channel of length
mapsize
Options Database Keys#
-draw_cmap name - select the colormap by name
-draw_cmap_reverse - reverse the colormap
-draw_cmap_brighten value - brighten (positive) or darken (negative) the colormap; value must be in
(-1, 1)
See Also#
Level#
developer
Location#
src/sys/classes/draw/utils/cmap.c
Index of all Draw routines
Table of Contents for all manual pages
Index of all manual pages