Member-only story

Gnuplot — Plot Albert Einstein with Terminal

Mikhail Raevskiy
11 min readSep 10, 2020

--

Gnuplot — Plot Albert Einstein with Terminal
3D Albert Einstein in Gnuplot

Disclaimer: this story originally was published at habr.com and represents a short translation of Sergey Dolin's work

Surely many of you leafing through Western scientific publications have seen beautiful and simple graphics. Perhaps some of you have wondered what these pundits visualize their data. And now there is a gorgeous and very simple graphing tool, which is almost everywhere: Windows, linux, android, and others, I’m sure there is even under DOS. It is reliable, simple and allows you to present any text-tabular data in the form of beautiful graphs.

Why Gnuplot?

If you have already read some of my articles, you might have noticed beautiful graphs.

Gnuplot — graph from the post about the random number generator
Graph from the post about the random number generator
Gnuplot — Graph from the post about the speediest modems
Graph from the post about the speediest modems

The graphs are simple and cool. The most valuable advantage of Gnuplot is that to plot them you only need a text file with the raw data, Gnuplot on your favorite OS (OpenWRT though), and your favorite vim test editor.

At first glance, it might seem that Gnuplot is more difficult to use for plotting than MS Excel. But it only seems that way, the entry threshold is a little higher (you can’t use a mouse to click it, you need to read the documentation here), but in practice, it comes out much easier and more convenient. I wrote a script once and have been using it all my life. It’s really much more difficult for me to plot a graph in Exel, where everything is not logical than in Gnuplot. And the main advantage of Gnuplot is that you can embed it into your programs and visualize data on the fly. Also Gnuplot without any problems builds a graph from a 30-gigabyte file of statistical data, while Exel simply crashed and could not open it.

The pluses of Gnuplot include the fact that it can be easily integrated into the code in standard programming languages. There are ready-made libraries for many languages, I personally came across PHP and python. Thus, you can generate graphs directly from your program.

--

--

Mikhail Raevskiy
Mikhail Raevskiy

Written by Mikhail Raevskiy

Bioinformatician at Oncobox Inc. (@oncobox). Research Associate