Scale measurement data

后端 未结 2 1840
不知归路
不知归路 2020-12-07 04:33

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

相关标签:
2条回答
  • 2020-12-07 05:17

    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.

    0 讨论(0)
  • 2020-12-07 05:29

    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)
    
    0 讨论(0)
提交回复
热议问题