|
From: John H. <jd...@gm...> - 2007-11-26 15:02:35
|
On Nov 24, 2007 8:46 PM, Michael Frauens <wet...@ya...> wrote: > > Wasn't sure where to post this so I'll keep it brief (and I have tried to > check forums, FAQ and guides) > > I'm a relative noob but have a Tk based GUI running properly and have used > Matplotlib successfully in two separate implementations of code. When I try > to combine my GUI code with my matplotlib code and then place a "from pylab > import *" into my code, I run into problems with the GUI widgets "text" > variable "not being expected". This is before I execute any specific > features of pylab. Short answer: you cannot use pylab in a GUI. Rather, you have to use the matplotlib API (see http://matplotlib.sourceforge.net/faq.html#OO ). There are some examples to get you started, eg http://matplotlib.sourceforge.net/examples/embedding_in_tk.py http://matplotlib.sourceforge.net/examples/embedding_in_tk2.py Hope this helps, JDH |