popsynth.utils.array_to_cmap module¶
-
popsynth.utils.array_to_cmap.
array_to_cmap
(values, cmap, use_log: bool = False)[source]¶ Generates a color map and color list that is normalized to the values in an array. Allows for adding a 3rd dimension onto a plot.
Parameters: - values – A list a values to map into a cmap
- cmap – The mpl colormap to use
- use_log (bool) – True if the mapping should be done in log space False by default.
Returns: A color map and a normalized color list