

A Static Bar ChartĪ simple but useful example of Gnuplot would be to show the realtime status of the Raspberry Pi General Purpose Input/Output (GPIO) pins as a bar chart.Ī bar chart presentation can be created using a data file of: For this example the plot command will use the data in the $Mydata variable and create a line chart. The end-of-data delimiter (EOD in the example) may be any sequence of characters. $ gnuplotĭata block names must begin with a $ character, which distinguishes them from other types of persistent variables. Below is an example where 4 sets of data points are plotted in a line chart. When Gnuplot is run manually the charting instructions and data values can be inserted directly. Gnuplot is typically run as a command line utility, but it can also be run manually.
HISTOGRAMS GNUPLOT INSTALL
To install Gnuplot on Ubuntu: sudo apt-get install gnuplot Gnuplot can be installed on Linux, Windows, and Mac. The first will show the status Raspberry Pi I/O pins, and the second example will be a line chart of CPU diagnostics. In this blog I’ll introduce Gnuplot and show two examples.

( For simple Bash applications it is possible to create charts in just 1 line.) I was amazed that I could make real-time bar and line charts in only 20 lines of scripting code. Gnuplot has been around for quite awhile and I was happily surprised at what it can do. There are some excellent charting and plotting packages but if you’re like me you sometimes want to do a quick test plot to capture some realtime data.
