我有一个12列的文件。我想用x轴作为我的第1列,y轴是第2列和第8列之间的差额。
我尝试过plot "test.dat" using 1:(8-2)
,但很自然,它被解释为1:6
。我该怎么做?
发布于 2014-07-16 20:11:15
您缺少$
,只需添加它们,它们将允许您引用列内容
plot "test.dat" using 1:($8-$2) w linespoints
$1
是column(1)
的快捷方式,如果列号存储在变量i
和j
中,则必须使用column
语句来选择相应的列:
i = 8
j = 2
plot "test.dat" using 1:(column(i)-column(j)) w lp
发布于 2020-03-02 22:06:56
< awk‘{打印$8 - $2}’测试‘
https://stackoverflow.com/questions/24789446
复制相似问题