|more useful options|
Running (real-)time series plots with gnuplot?by RMGir (Prior)
|on Sep 10, 2002 at 14:31 UTC||Need Help??|
RMGir has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to plot data as it arrives in realtime with gnuplot.
I've arrived at a fairly simple perl solution, but it involves writing the data to a temporary file and then replotting the whole file every second.
I'm afraid this will result in too much overhead towards the end of the day, as the number of data points accumulates.
I have a perl implementation of my approach, and I'd like suggestions from any gnuplot gurus out there as to more efficient ways to do this.
I've looked at Chart::Graph::Gnuplot, and looked at a few gnuplot related nodes here, but I don't think they solves this problem.
Here's a dummy data source. In reality, this could take input from anything that outputs a time and a value.
Here's the actual gnuplot-calling code. This assumes gnuplot is on your path, and that you have File::Temp installed.
If you don't have File::Temp, it should be simple to adjust the script to use a fixed file name.