Monday, October 8, 2012

16 - plotting of subtraction of two columns in two different files in gnuplot

Suppose that we have two different files called File1.dat and File2.dat. The first file has 4 columns and the second file has 5 columns.
Our purpose is to plot the first column in the first file respect to difference of column 3 in the File1.dat and column 4 in the File2.dat. To do this we use the following command:

pl "< paste File1.dat File2.dat" u 1:($3-$8) w l

(with using this command, we assemble all columns in a same place. Therefor we have 4+4=8 columns where the first 4 columns belong to the first file and the rest ones belong to the second file.)

No comments:

Post a Comment