1

I have two files 'dat1.txt' and 'dat2.txt', each containing two columns of data.
Now, I want to plot column 1 from dat1.txt against the product of column 2 from dat1.txt and column 2 from dat2.txt such as:

(column1 dat1):((column2 dat1)*(column2 dat2))

I tried this by using:

plot'< paste data1.txt data2.txt' using 1:($2*$4)

which results in

x range is invalid

How is this possible using gnuplot? Is there an easier way using a different program (e.g. mathematica)?

I guess, that I'm using >paste falsely or the range is not defined correctly.

Thanks.

A.Doe
  • 11
  • 1
  • The plot command looks fine, see also http://stackoverflow.com/a/20070138/2604213. If it doesn't work, it must be something you don't mention. How do your data files look like? Do you get any other error? Does your system have `paste`? Etc – Christoph Feb 20 '17 at 18:09

1 Answers1

0

Maybe your datafiles need a delimiter in the paste command: paste -d " " data1.txt data2.txt