On Tue, Jun 1, 2010 at 2:22 PM, rugspin <piet_par...@web.de> wrote:
> That's doing it, thought there might be an internal way within matplotlib,
> but I could figure one.

If you need more hard-core way of doing this,

a = np.arange(16384).reshape(128, 128)

from matplotlib.colors import Normalize
import matplotlib.cm as cm
norm = Normalize(vmin=0, vmax=16383)
cmap = cm.summer

A = (cmap(norm(a))*255).astype(np.uint8)

import Image
pilim = Image.fromarray(A, "RGBA")

------------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to