I have some measured data, experiment.dat
which goes like this:
1 2
2 3
Now I want to plot them via some command line
You don't need to multiply the column by minus one, you can simply use:
p "experiment.dat" u 1:(-$2)
at least with Version 5.4 works fine.
You can also only use the initial letter of every command.
Yes, you can do any kind of calculations inside the using
statement. To scale the y
-value (the second column) with -1
, use
plot "experiment.dat" using 1:(-1*$2)