Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
For loop gnuplot:for和columnheader命令_For Loop_Gnuplot_Columnheader - Fatal编程技术网

For loop gnuplot:for和columnheader命令

For loop gnuplot:for和columnheader命令,for-loop,gnuplot,columnheader,For Loop,Gnuplot,Columnheader,我计划绘制多列数据文件。用第1列和第i列绘制xy图。因此,该命令基于手册进行工作。哪个gnuplot版本begin有这样的功能?我的机器安装了版本4.2,但无法工作。columnheader()也有同样的问题 我想确定这是我的代码问题还是版本问题。版本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 aut

我计划绘制多列数据文件。用第1列和第i列绘制xy图。因此,该命令基于手册进行工作。哪个gnuplot版本begin有这样的功能?我的机器安装了版本4.2,但无法工作。columnheader()也有同样的问题

我想确定这是我的代码问题还是版本问题。

版本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版开始,您可以在
绘图
命令中使用迭代:

set key autotitle columnheader
set style data lines
plot for [i=2:4] 'data.txt' using 1:i

如果标题列与使用语句的
中给出的列不匹配,您也可以使用
标题列标题
标题列标题(i+1)
而不是使用
设置键autotitle columnheader
。至少从4.2开始,这也可以使用。

我认为
为…
绘图从4.4开始就可以使用,
为[…]{…}
绘图,它更强大,从4.6开始就可以使用。@Miguel我不一定说
绘图更强大,因为在这种情况下必须使用
绘图。)