I have a long running (non-GUI) python application, that needs to plot
some curves and update them in time, as new data are computed. I'm
well aware of ezplot, but would like to use a matplotlib-multiprocessing-only solution, as I have already enough
The best thing I have come so far with is essentially in the attached script (I stripped all unneeded dependencies and fancy stuff). It works quite well in terms that it plots as the data arrive, but I cannot find a way how to stop it cleanly. At the end, it just hangs (Ctrl-C does not help). I would appreciate any hints on what is wrong.
There are two classes: NBPlot spawns the new process and feeds it the data, ProcessPlotter is the "remote" plotter class plotting the data as they arrive. The plot update is done using gobject.timeout_add() according to the matplotlib examples. It can be run as:
$ python log.py
Best regards and thanks for your suggestions,
log.py (1.82 KB)