I am trying to generate a gnuplot that uses data from two different data files for the same plot line, something like this:
plot 'datafile1.dat' using 1:($2/('datafile2.dat' using 2)
i.e. x-axis: column 1 from datafile1.dat; y-axis: (column 2 of datafile1.dat) divided by (column 2 of datafile2.dat)
The syntax above is obviously incorrect, but is there a way to achieve this using gnuplot?
An example input data set is as follows: (Both data files have similar set of data)
nSp   Kf  
10    523276.8  
50    6915841.1  
100   24736818.3  
500   622677171.35  
1000  2892599744  
...  
Other solutions I have read online required concatenation of datafile1.dat and datafile2.dat before using plot. The actual data files have many more columns that are used for other plots and hence I wish to avoid this concatenation. If anyone has an alternate solution that keeps the two files separate, I would be very grateful.
Thank you!
