How to plot a single graph from multiple files using Gnuplot

Assume you have a lot of data files where any line in each of those files refers to a common entity. If you don’t want to merge the files by hand you can directly plot them from inside Gnuplot using a pipe:

plot '< paste FILE1.dat FILE2.dat' using 2:4

In the example, both files have two columns and we relate the second column of each file. Generally, write “using [column index in first file]:[number of columns in first file + column index in second file]“.

Comments are closed.