I'm trying to run a program that plot experimental datas during measurement (to check if experiment is okay). I started doing directly measuring one point and plotting it

import matplotlib
matplotlib.use('TkAgg')
...
from pylab import *
...
ion()
while cond:
    measure()
    plot(X[-1:],Y[-1:],"o") #plot data point

1) with ipython, the graph stays hidden by the ipython window
lauching by direct double click, it is okay plot is not hidden but after 2 click on the plotting window, it freezes or if I try to move the window, it does not move then the plot window is "not responding" anymore.

I thought I would solve this using a seperate thread for the plot. I tried but no chance

class update_plot(threading.Thread):
    def run(self):
        global X,Y,end
        xlabel('X')
        ylabel('Y')
        title('Y(X)')
        grid(True)
        ion()
        while end!=1:
            plot(X[-1:],Y[-1:],"o")
            #show()
            time.sleep(0.2)



I've seen the FAQ and some few mails in the list, I didn't really get the way to solve this problem ?

If not possible, maybe I could look for other options for plotting but I wouldn't like. I'm pretty much accostumed to matplotlib (usually working on linux were there is not that problem or limitation).


At first glance the only matplotlib example that works OK is dynamic_demo_wx.py

I think I shall learn a bit of wxpython and adapt dynamic_demo_wx.py for my case?
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to