我正在尝试从多列文件中绘制,其中第一列是x,其余应该是y列,如下所示:
plot for[col=2:36:1] 'datafile' using 1:col with lines lc rgb 'black' notitle
这工作正常,但我想做的是将所有y列都偏移一个恒定值。
我尝试过这样的事情:
plot for[col=2:36:1] 'datafile' using 1:(col-const) with lines lc rgb 'black' notitle
但这是行不通的(似乎是在绘制变量col和常量const之间的差异)。
有没有办法做到这一点?我在这里找到了如何偏移2列文件(或文件中的特定列)的y列的方法
plot 'otherdatafile' using 1:($2-const) with lines
但这可以扩展到我的情况吗?
提前致谢,
露西安
使用1:(column(col)-const)应该可以
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句