我计划绘制多列数据文件。用第一列和第i列绘制xy图。因此,命令的工作基于手册。哪个gnuplot版本的begin有这样的功能?我的机器安装了4.2版,但是不能工作。对columnheader()也有同样的问题
我想确定这是我的代码的问题,还是版本的问题。
发布于 2014-10-19 17:02:54
4.2版已经具有columnheader功能。
考虑包含以下内容的数据文件data.txt
first second third fourth
1 2 3 4
2 3 4 5
3 4 5 6在gnuplot 4.2中,您可以使用例如
set key autotitle columnheader
set style data lines
plot 'data.txt' using 1:2, '' using 1:3, '' using 1:4从4.4版开始,您可以在plot命令中使用迭代:
set key autotitle columnheader
set style data lines
plot for [i=2:4] 'data.txt' using 1:i如果标题列与using语句中给出的列不匹配,也可以使用title columnheader或title columnheader(i+1),而不是使用set key autotitle columnheader。至少从4.2开始,这也是有效的。
https://stackoverflow.com/questions/26448753
复制相似问题