Real-time plots in 20 lines

The Plot Twists

© Lead Image © Volodymyr Horbovyy, 123rf.com

© Lead Image © Volodymyr Horbovyy, 123rf.com

Article from Issue 244/2021
Author(s):

Use Gnuplot with command-line utilities.

Some excellent charting and plotting packages can be found, but if you're like me, you sometimes just want to do a quick dynamic test plot without a lot of custom setup. Gnuplot is a command-line charting utility that has been around for a while, and I was amazed how easy it was to get up and running. In only 20 lines of scripting code, I was able to create real-time line and bar charts.

In this article, I introduce Gnuplot with two dynamic examples: The first shows the status of Raspberry Pi I/O pins, and the second is a line chart of CPU diagnostics.

Getting Started

Gnuplot [1] can be installed on Linux, Windows, and macOS. To install Gnuplot on Ubuntu, enter:

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Open Data

    A lot of COVID-19 data is available through online REST APIs. With a little ingenuity and some open source tools, you can extract and analyze the data yourself.

  • Julia on the Pi

    Create GUIs and a web app that connects to sensors.

  • Tutorial – Matplotlib

    Matplotlib offers so many options that you may have trouble deciding on which ones to use for your plots.

  • Workspace: ExifTool

    Understanding the full power of ExifTool can be daunting. We show how to put it to practical use.

  • Low-Code with Snap4Arduino

    Snap4Arduino brings the power of low-code programming to the Arduino hardware environment.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News