cmap_alpha

eomaps.helpers.cmap_alpha(cmap, alpha, interpolate=False, name='new_cmap')

add transparency to an existing colormap

Parameters:
  • cmap (matplotlib.colormap) – the colormap to use

  • alpha (float) – the transparency

  • interpolate (bool) – indicator if a listed colormap (False) or a interpolated colormap (True) should be generated. The default is False

  • name (str) – the name of the new colormap The default is β€œnew_cmap”

Returns:

new_cmap – a new colormap with the desired transparency

Return type:

matplotlib.colormap