2010/3/20 Ciarán Mooney <general.moo...@googlemail.com>:
> I am using PIL because I plan to plug in a Tkinter interface which can
> directly accept PIL image instances.

You can render matplotlib figures to PIL using following code:

figure.set_size_inches(float(shape[0]) / figure.dpi, float(shape[1]) /
figure.dpi)

canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(figure)
canvas.draw()
image_string = canvas.tostring_rgb()

image = Image.fromstring("RGB", shape, image_string)

fwiw,
Friedrich

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to