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
arraynumpy.ndarray

The array to be mapped onto a colormap.

cmapstr

The name of a Matplotlib colormap.

scale{‘linear’ | ‘log’}, optional

The scaling of the data as mapped to the colormap.

vminfloat, optional

The value associated with the low end of the colormap. By default this is the minimum value of arr.

vmaxfloat, optional

The value associated with the high end of the colormap. By default this is the maximum value of arr.

Returns
colorslist

A list of colors, encoded in ARGB hex values.