sidpy.viz.plot_utils.cmap.cmap_from_rgba¶
- sidpy.viz.plot_utils.cmap.cmap_from_rgba(name, interp_vals, normalization_val)[source]¶
Generates a colormap given a matlab-style interpolation table
- Parameters:
name (String / Unicode) – Name of the desired colormap
interp_vals (List of tuples) – Interpolation table that describes the desired color map. Each entry in the table should be described as: (position in the colorbar, (red, green, blue, alpha)) The position in the color bar, red, green, blue, and alpha vary from 0 to the normalization value
normalization_val (number) – The common maximum value for the position in the color bar, red, green, blue, and alpha
- Returns:
new_cmap – desired color map
- Return type:
matplotlib.colors.LinearSegmentedColormap object