I have
FileSFC1: contains certain data
FileSFC2: contains some other data
Now what I need to do is divide the second column of FileSFC1 with the second column of FileSFC2 and then plot this result. So something of the form:
plot ( FileSFC1 using 1:1 / FileSFC2 using 1:1 ) * 100
So basically the plot would be a percentage of the columns in the two files. Please help.
Gnuplot can only manipulate columns of data that are from the same 'file' or data stream. What you can do is use the plot '< bash command'
construction. When the argument to plot
starts with <
what happens is the rest of the argument is interpreted as a bash command, and the output of that command is what is plotted. So:
plot '< paste FileSFC1 FileSFC2' u (100*$2/$4)
This assumes that both files have two columns, and you want to plot the percentage of the 2nd column in each file. To perform manipulations on data columns, the syntax is to enclose the argument to using
in parentheses and prefix column numbers with a dollar sign.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With