I really like the MPlot and matplotlib libraries, but am have some issues using
it in an interactive manner.
Here are the details:
- Running on Windows XP
- Run through an ipython interactive session
- Run *during data-taking*, that is, every 3s or so, several calls to oplot
- Ipython is run with the -wthread option, and thus threading.enumerate() shows
two threads: [<_MainThread(MainThread, started)>,
- pylab.ion() has been called
The problem is that the window refuses to refresh itself until the entire
data taking process is finished (~8 hours)
If I try and simulate the above problems manually, one easy way to create
this unresponsiveness of the MPlot window is to call time.sleep(10) from
IPython. The window will remain unresponsive for 10s.
Why is this? Shouldn't the plot-refresh code, or at the very least, the gui
code be running in the wxpython thread?
I've had this problem in the past, and sent around some emails. At the time
a managed to "solve" the problem, but there were so many variables (ipython
command line args, threads present, ways in which functions were called, etc)
that I was unable to isolate the solution. I'm facing the same problem again,
and tried to recreate the solution, but it's not working. I guess there's some
black magic involved somewhere.
The problem is also that I'm a struggling PhD student (ie in over my head),
so I didn't really have time to figure this one out. I'd love to be more of
a contributor to matplotlib and it's related projects, but at the moment I don't
really have time to reinvent the wheel everytime I do an experiment.
Everyone here uses labview (which drives me nuts).
Any help you could give me would be *greatly* appreciated.