Add alpha to an existing colormap
I’m not quite sure if this qualifies within “not knowing the inner structure of the colormap”, but perhaps something like this would work to add a linear alpha to an existing colormap? import numpy as np import matplotlib.pylab as pl from matplotlib.colors import ListedColormap # Random data data1 = np.random.random((4,4)) # Choose colormap cmap = … Read more