2010/4/8 Filipe Fernandes <ocef...@gmail.com>: > BTW: What I meant by limitation is the fact that Agg has no GUI like the > nice QT window I was using before. The users of this script have no > experience with scripting languages and enjoyed choosing the format and > filename using a GUI interface.
I'm quite convinced that you can have the figure in multiple Canvases at the same time. Or create the FigureCanvasAgg or the call to .savefig() only on save time. In every widget framework, it should be fairly easy to build a custom gui having a customised "Save ..." button, I guess? > In addition, PIL's show() use an external linux program "xv". In the end > I wanted to eliminate one external linux program (Imagemagik convert) > but ended up with another one... When using Tkinter, you can use ImageTk: im = {some PIL Image} # Some image to be shown canvas = {some Tkinter.Canvas} # For drawing graphics viewport = ImageTk.PhotoImage(im) canvas.create_image((0, 0), image = viewport, anchor = 'nw') # Put the image on the Tkinter.Canvas. Modify according your needs. # Now the PIL Image has been rendered on the canvas. # Maybe do canvas.update() or call the master's .update(), # or call some .mainloop() entry function. For instance, use the # Tkinter.Tk instance's method .mainloop(). When renewing the graphics, don't forget to canvas.delete({tag}) using the {tag} returned by canvas.create_image(), otherwise you will probably loose perfomance. There are examples on matplotlib.sourceforge.net how to use Tkinter with matplotlib. hth, 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users