Scale measurement data

2019-01-28 21:11发布

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

plot "experiment.dat" using 1:2 title "experiment" with lines lw 3

Is there some way how to scale the different lines with some scaling factor like -1?

1条回答
▲ chillily
2楼-- · 2019-01-28 21:48

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)
查看更多
登录 后发表回答