|
From: Antonino I. <tri...@gm...> - 2007-03-15 17:59:43
|
On 3/15/07, Pellegrini Eric <eri...@ya...> wrote: > Hello everybody, > > when using matplotlib, any plot I create is displayed separately from my > Tkinter application. Is there a direct way to embed the plot created by > matplotlib in a widget such as a canvas using something like "create_image" > or something else ? > > Currently, the only thing I managed to do is: > -create my plot with matshow > -save the figure using savefig (png) > -embed the png in a canvas using create_image > > not very smart, isn't it ? Definitely not ;). It's simple to embed matplotlib in the common toolkits. Download the examples tarball from the matplotlib site and look at the files embedding_in_XXX.py. There are examples for tk, gtk, qt and wx toolkits. > Thank you very much > > best regards > > Eric Pellegrini ~ Antonio |