|
From: Angel E. M. <ang...@gm...> - 2007-08-12 07:56:39
|
Hi, I want to make a small python script that monitors a text file and plots its contents. This script is meant to run in Windows. The file that is being monitored has one floating point number per line and new numbers can be appended to the end of the file at any moment by some external program. Therefore the script needs to keep reading the file and if new data is found, it should update the plot (a simple plot() command will do for now). To do so the script has an endless loop that tries to read new data and if it can it plots it and issues a pylab.draw() command. I got the script working, (based on the "anim.py" example from the Matplotlib web page: http://matplotlib.sourceforge.net/examples/anim.py). The script updates the plot correctly when new data is added to the file. However, the figure itself is not really functional. By that I mean that the figure cannot maximized while the script is running. It is not possible to change the zoom or use the toolbar either. The example script has the same problem (i.e. the figure cannot maximized), so I'd like to know if there is any way around this or if I should use something other than pylab instead. Thanks! Angel |