From: Jean-Baptiste M. <mar...@ia...> - 2012-03-02 16:03:43
|
Aloha Eric, > This appears to be very much a dueling event loop problem. My guess is > that the solution will have to be something that keeps the event loops > well separated, probably in separate processes. All interaction with > your Client event loop would be in one process, and the callback would > get your data and put it somewhere (e.g. in a numpy npz file). Then the > trick is to have the matplotlib process in a polling loop using a timer > (done crudely with plt.pause(0.1); there is probably a better way) > checking to see if that "somewhere" has been updated, and if so, > updating its plot. I feel I see the light at the end of the tunnel. The npz file is even not necessary, I just need to pass the star id to a separate plotting process, to be compared to some stored previous value, in order to refresh the plot. I have to think about it for a couple of days… Thanks for the suggestion, Cheers, JB |