gnuplot:“一个”;为「;和多个using语句

gnuplot:“一个”;为「;和多个using语句,gnuplot,Gnuplot,我在一个目录中有多个数据文件,希望从所有这些文件中生成一个绘图。 每个数据文件都有自己的列头(set key autotitle列头) 当我绘制一个图形(一个“使用”)语句时,它就起作用了。如果有多个using语句,则仅正确打印第一个,对于其他语句,仅处理第一个数据点(仅一个标签、一个yerrorbars,但有5个线点) gnuplot语句: set key autotitle columnhead files = system("echo $(ls *.cs

我在一个目录中有多个数据文件,希望从所有这些文件中生成一个绘图。 每个数据文件都有自己的列头(set key autotitle列头)

当我绘制一个图形(一个“使用”)语句时,它就起作用了。如果有多个using语句,则仅正确打印第一个,对于其他语句,仅处理第一个数据点(仅一个标签、一个yerrorbars,但有5个线点)

gnuplot语句:

set key autotitle columnhead                  
files = system("echo $(ls *.csv)")

plot for [i=1:words(files)] word(files,i) using 0:2:xtic(1) with lp ,\
'' using 0:2:2 with labels font ',8' offset 1,0.5 notitle "",\ 
'' using 0:2:3 with yerrorbars lt -1 lc rgb 'grey' title "" 
如果我只打印标签或yerrorbars,它们也是正确的,那么只有当我使用多个带有“plot for”的“using”语句时,它才会被破坏

有人知道我做错了什么吗

Gnuplot版本:4.6.5

非常感谢
(gnuplot快把我逼疯了)

for迭代只适用于第一个命令。为了在以下命令中也进行迭代,必须重复该迭代:

set key autotitle columnhead                  
files = system("echo $(ls *.csv)")

plot for [f in files] f using 0:2:xtic(1) with lp ,\
     for [f in files] f using 0:2:2 with labels font ',8' offset 1,0.5 notitle "",\ 
     for [f in files] f using 0:2:3 with yerrorbars lt -1 lc rgb 'grey' title "" 

请注意,在您的情况下(您不需要迭代索引
i
),您可以直接对文件进行迭代。

我不太明白您想要实现什么。你能试着抽象一下你的
.csv
文件包含的内容并举例说明吗?