Plotting streaming data in real-time with Gnuplot

Technology

gnuplot_20080922.gif

Our friend Thanassis Tsiodras, who you may remember as the creator of the offline Wikipedia reader, wrote in to tell us about a handy way to plot real-time data using standard unix tools.

For the last couple of years, I’ve been working on European Space Agency (ESA) projects – writing rather complex code generators. In the ESA project I am currently working on, I am also the technical lead; and I recently faced the need to provide real-time plotting of streaming data. Being a firm believer in open-source, after a little Googling I found Gnuplot; and quickly hacked a Perl script that spawns instances of Gnuplot and plots streaming data in real-time. Googling doesn’t reveal anything similar, so I published it here.

You can easily pipe any data stream into his druveGnuPlots.pl script, choose the zoom and y-range and it will take care of reading in the data and passing it to Gnuplot with your specifications. This is pretty neat, since it means you can easily plot just about anything and all you need to do is get your measurements into a newline-delimited output format.

Visualize real-time data streams with Gnuplot

Discuss this article with the rest of the community on our Discord server!
Tagged

I'm a tinkerer and finally reached the point where I fix more things than I break. When I'm not tinkering, I'm probably editing a book for Maker Media.

View more articles by Brian Jepson

ADVERTISEMENT

Ready to dive into the realm of hands-on innovation? This collection serves as your passport to an exhilarating journey of cutting-edge tinkering and technological marvels, encompassing 15 indispensable books tailored for budding creators.

FEEDBACK