generating multiple graphs on demand

Hello, I'm writing an app that requires a gui interface

    > that will generate graphs on demand. When one top-level
    > window containing a new graph is created, it should not
    > block the application from making new ones if the user
    > requests one.

    > I can do this myself but I like matplotlib. How could I
    > do this? So far it seems that my app blocks on the show()
    > call, and if I try to make a new graph after that, the
    > whole application locks up and has to be killed.

Don't use the pylab interface when building moderately complex
applications -- use the OO library instead. What GUI toolkit are you
using to build your app? See embedding_in_*.py, in the examples
directory, where * is the name of your GUI toolkit, eg, tk, gtk, wx
etc.

See also http://matplotlib.sourceforge.net/faq.html#OO

Hope this helps,
JDH

Ok, thanks. It's either going to be Tkinter or wxPython. The former is
easier to use and deploy, but the latter looks slicker and seems to
have more high-level widgets (poorer docs), and nice tools like
wxGlade.

Mike

···

On 4/28/05, John Hunter <jdhunter@...4...> wrote:

Don't use the pylab interface when building moderately complex
applications -- use the OO library instead. What GUI toolkit are you
using to build your app? See embedding_in_*.py, in the examples
directory, where * is the name of your GUI toolkit, eg, tk, gtk, wx
etc.

See also http://matplotlib.sourceforge.net/faq.html#OO

--
Michael P. Soulier <msoulier@...287...>
http://www.digitaltorque.ca
http://opag.ca python -c 'import this'

Hi Michael,

Michael Soulier wrote:

Don't use the pylab interface when building moderately complex
applications -- use the OO library instead. What GUI toolkit are you
using to build your app? See embedding_in_*.py, in the examples
directory, where * is the name of your GUI toolkit, eg, tk, gtk, wx
etc.

See also http://matplotlib.sourceforge.net/faq.html#OO

Ok, thanks. It's either going to be Tkinter or wxPython. The former is
easier to use and deploy, but the latter looks slicker and seems to
have more high-level widgets (poorer docs), and nice tools like
wxGlade.

With wxPython the demo is your friend, it is often a separate download and it contains small to extensive samples for just about every widget.

There is also a new documenation in the works, not complete, but not bad either look at wxPython API Documentation — wxPython Phoenix 4.2.1 documentation

If you decide on wxPython you might want to start with 2.6 (which just came out and has some nice things like foldpanel) and you might want to look at Boa Constructor if you like IDE's.

See you
Werner

···

On 4/28/05, John Hunter <jdhunter@...4...> wrote:

Mike

With wxPython the demo is your friend, it is often a separate download
and it contains small to extensive samples for just about every widget.

I found that the demos were all done with the old namespace setup,
which is a real pain when the new wx.* setup is now recommended.

There is also a new documenation in the works, not complete, but not bad
either look at wxPython API Documentation — wxPython Phoenix 4.2.1 documentation

If you decide on wxPython you might want to start with 2.6 (which just
came out and has some nice things like foldpanel) and you might want to
look at Boa Constructor if you like IDE's.

Well, I'm in a bit of version hell, trying to find versions of every
package I want that's going to work together, including
boa-constructor. wxGlade seems nicer to me though, I might try that.

Still, for simple guis Tkinter rocks, it's fast, and it's easy to
port. Mannings book on it is great, if erroneous in places. Good docs
are a must.

Thanks,
Mike

···

On 4/29/05, Werner F. Bruhin <werner.bruhin@...185...> wrote:

--
Michael P. Soulier <msoulier@...287...>
http://www.digitaltorque.ca
http://opag.ca python -c 'import this'

Do you mean Grayson's book?
Any other recommendations?

Thank you,
Alan Isaac

···

On Fri, 29 Apr 2005, Michael Soulier apparently wrote:

for simple guis Tkinter rocks, it's fast, and it's easy to
port. Mannings book on it is great, if erroneous in
places. Good docs are a must.

Michael Soulier wrote:

Well, I'm in a bit of version hell, trying to find versions of every
package I want that's going to work together, including
boa-constructor.

Yes, Boa is kind of behind the times, but I imagine it will catch up soon.

Still, for simple guis Tkinter rocks, it's fast, and it's easy to
port.

Port to what?

Mannings book on it is great,

There is a wxPython book coming out fairly soon, but that doesn't help you now.

Good docs are a must.

Yes, and wxPython has them. It's a little skimpy on the newbie-oriented stuff, but between the demo, the reference and the Wiki, there is a lot of good stuff there.

We really should make a concerted effort to port the demo to modern idioms (including the wx namespace), though I just took a look, and the first four items I clicked on were using the wx namespace, so it's not so bad!

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Hi Michael,

Michael Soulier wrote:

With wxPython the demo is your friend, it is often a separate download
and it contains small to extensive samples for just about every widget.
   
I found that the demos were all done with the old namespace setup,
which is a real pain when the new wx.* setup is now recommended.

Are you sure you got the latest demo? I don't have my 2.5 version installed anymore as I just got 2.6 the other day, but in 2.6 demo's all the ones I looked at use the new namespace.

There is also a new documenation in the works, not complete, but not bad
either look at wxPython API Documentation — wxPython Phoenix 4.2.1 documentation

If you decide on wxPython you might want to start with 2.6 (which just
came out and has some nice things like foldpanel) and you might want to
look at Boa Constructor if you like IDE's.
   
Well, I'm in a bit of version hell, trying to find versions of every
package I want that's going to work together, including
boa-constructor. wxGlade seems nicer to me though, I might try that.

Getting all the right versions is not easy. I stayed until recently on wxPython 2.4 (one because it is the "stable" release, but also as I couldn't get all tools I want to use on 2.5). Only switched to 2.5 a couple of month ago, that switch was much easier then I first thought and now with 2.6 its even better. Haven't looked at wxGlade for some time, but I understand its handling of sizers is more intuative then in Boa, but then I am pretty sure Riaan will catch up on this. When I started using wxPython I wanted an IDE and not just a GUI generator that is why I went with Boa at the time.

Still, for simple guis Tkinter rocks, it's fast, and it's easy to
port. Mannings book on it is great, if erroneous in places. Good docs
are a must.

We wx fans are still waiting for THE book (hopefully sometimes this year). I agree good docs are a must (also I don't like having to read them :wink: ), I don't like the wxWidget stuff as it is in C++ but after a while one gets the hang of it, however I find most of the times the answer in the demo, or now in the new API docs, or the wiki pages and if all that doesn't work someone will help when you post to wxPython-users@...594...

Thanks,
Mike

See you and have fun making your choices
Werner

···

On 4/29/05, Werner F. Bruhin <werner.bruhin@...185...> wrote: