map_array_to_colors¶
- pywwt.windows.map_array_to_colors(arr, cmap, scale='linear', vmin=None, vmax=None)[source]¶
Map a NumPy array to a colormap using Matplotlib.
- Parameters:
- array
numpy.ndarray
The array to be mapped onto a colormap.
- cmap
str
The name of a Matplotlib colormap.
- scale{‘linear’ | ‘log’}, optional
The scaling of the data as mapped to the colormap.
- vmin
float
, optional The value associated with the low end of the colormap. By default this is the minimum value of
arr
.- vmax
float
, optional The value associated with the high end of the colormap. By default this is the maximum value of
arr
.
- array
- Returns:
- colors
list
A list of colors, encoded in ARGB hex values.
- colors