ASCII plotting on the command line terminal with eplot

If you want to plot something on the terminal in ASCII you can use “eplot”.

eplot itself is a Ruby script that acts as a frontend for gnuplot. eplot can be downloaded from the project’s GitHub page. It makes it easier to pipe numbers into gnuplot, which can otherwise be a bit of a hassle. It also has a dumb terminal mode which allows us to plot using ASCII. Plotting like this provides a way to quickly check data files without requiring any x windowing system, which might not be available when logging in remotely over the terminal.

If your computer already has gnuplot and the Ruby runtime installed then the following should work.

Example:

cat model.ht | tail -n +2 | awk '{print $1,$2}' | eplot-master/eplot -d -r [0:5]

The -d option chooses ASCII “dumb terminal” mode and -r allows us to set the x axis range.

Some example output:

 

Now, of course if you want to do the same for a remote file that is possible over ssh.

ssh user@remote.server cat /somepath/model.ht | eplot-master/eplot -d

There are obviously many more options to play around with but I hope this gives a brief introduction to some of the capabilities available.