Real Time Data Plotting with GNUPlot


I wrote this script a few days ago to plot real-time / streaming data with gnuplot. The motivation was that I needed to test a piece of code for a touchscreen driver that I had written at work. The issue was that the UI wasn’t quite ready yet, so I wanted to test just the driver to be working fine. Now, the very first thought for the software to use that came to me was “gnuplot” but I found that it can’t really do this in an easy way. A colleague suggested me to use “replot” command with gnuplot. I whipped out my perl hat and a few hours later, voila!! my very own real time data plotter was ready. Now, I can stream data from any program to this script or provide the data on STDIN and can see the data being plotted continuously. BTW, it was awesome to see all the shapes that I drew on my target board’s LCD touchscreen to come alive on my PC monitor almost instantaneously.

I call it “rtgnuplotter”. A weird name I know :P, but I just wanted to refer to it as a real time data plotter based on gnuplot.

I’d love to hear from you if you found it useful. Please send in your bug reports and feature requests and I’d be glad if you could spread a word about it amongst your data-loving friends :)


See also