sidpy.viz.plot_utils.cmap.make_linear_alpha_cmap

sidpy.viz.plot_utils.cmap.make_linear_alpha_cmap(name, solid_color, normalization_val, min_alpha=0, max_alpha=1)[source]

Generates a transparent to opaque color map based on a single solid color

Parameters:
  • name (String / Unicode) – Name of the desired colormap

  • solid_color (List of numbers) – red, green, blue, and alpha values for a specific color

  • normalization_val (number) – The common maximum value for the red, green, blue, and alpha values. This is 1 in matplotlib

  • min_alpha (float (optional. Default = 0 : ie- transparent)) – Lowest alpha value for the bottom of the color bar

  • max_alpha (float (optional. Default = 1 : ie- opaque)) – Highest alpha value for the top of the color bar

Returns:

new_cmap – transparent to opaque color map based on the provided color

Return type:

matplotlib.colors.LinearSegmentedColormap object