Re: [Matplotlib-users] threading problems

2008-06-22 Thread SRH
John Hunter-4 wrote: > >> I think that for interactive work such as you describe, ipython -pylab >> pretty well solves the problem, and provides window behavior like >> matlab's. > Yes, exactly. Those of you trying to make this work may want to read > http://matplotlib.sf.net/interactive.html .

Re: [Matplotlib-users] threading problems

2008-06-22 Thread John Hunter
On Sun, Jun 22, 2008 at 12:31 AM, Eric Firing <[EMAIL PROTECTED]> wrote: > Scott, > > I think that for interactive work such as you describe, ipython -pylab > pretty well solves the problem, and provides window behavior like matlab's. Yes, exactly. Those of you trying to make this work may want t

Re: [Matplotlib-users] threading problems

2008-06-21 Thread Eric Firing
Scott, I think that for interactive work such as you describe, ipython -pylab pretty well solves the problem, and provides window behavior like matlab's. Ipython is a big help when working with python even when you are not plotting. It is easy to install, and you don't have to learn much to st

Re: [Matplotlib-users] threading problems

2008-06-21 Thread SRH
Daniel Ashbrook wrote: > > The issue is that the > show() command takes over the main thread of execution, so I can't have > my listening process running. Essentially I need to: > > 1) Pop up a figure() > 2) Start the drawing loop > 3) Start the socket listener > 4) When the listener gets com

Re: [Matplotlib-users] threading problems

2008-06-19 Thread Daniel Ashbrook
John Hunter wrote: > I don't think this is what you want. gtk is already threaded. By > doing things in the gtk mainloop, you are using their threading. You > are asking for a world of pain if you try and mix in python threading > unless you really know what you are doing. The point of the exam

Re: [Matplotlib-users] threading problems

2008-06-19 Thread John Hunter
On Thu, Jun 19, 2008 at 2:30 PM, Daniel Ashbrook <[EMAIL PROTECTED]> wrote: > John Hunter wrote: >> >> Use the gtk mainloop and do your figure updates in a timeout add or a >> idle handler (as suggested in the animation tutorial at >> http://www.scipy.org/Cookbook/Matplotlib/Animations > > Excellen

Re: [Matplotlib-users] threading problems

2008-06-19 Thread Daniel Ashbrook
John Hunter wrote: > Use the gtk mainloop and do your figure updates in a timeout add or a > idle handler (as suggested in the animation tutorial at > http://www.scipy.org/Cookbook/Matplotlib/Animations Excellent, thanks. Your sample code adapted nicely; appended below for posterity. dan imp

Re: [Matplotlib-users] threading problems

2008-06-19 Thread John Hunter
On Thu, Jun 19, 2008 at 1:40 PM, Daniel Ashbrook <[EMAIL PROTECTED]> wrote: > I need to have a plot window hang around and be occasionally updated by > my script as it does things. I've been looking through examples and have > not been able to get anything to work. > > My current approach, inspired