2010/3/20 Ciarán Mooney <[email protected]>:
> 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® 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users