I would like to get a density distribution plot like this density http://www.nicolacarlon.it/out.png with the alpha channel instead of the blue channel like this density http://www.nicolacarlon.it/out2.png
I found this code but it doesn't works :(
theCM = cm.get_cmap()
theCM._init()
alphas = np.abs(np.linspace(-1.0, 1.0, theCM.N))
theCM._lut[:-3,-1] = alphas
plt.imshow(img, cmap=theCM)
plt.savefig("out.svg", transparent=True)