Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/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
Loops 在同一文件的gnuplot中打印列_Loops_Gnuplot - Fatal编程技术网

Loops 在同一文件的gnuplot中打印列

Loops 在同一文件的gnuplot中打印列,loops,gnuplot,Loops,Gnuplot,我有一个有18列的文件。使用gnuplot,我想以如下方式绘制它们:1:2,3:4,5:6,…,17:18 我一直在尝试使用do循环,但我不知道如何将循环中的运行索引包含在列数中。我试过这样的方法: 对于[i=1:18]使用(2*(i-1)+1)绘制“numbers.dat”:(2*(i-1)+2) 感谢将算术表达式的结果用作列索引,请使用列函数: plot for [i=1:18] "numbers.dat" using (column(2*(i-1)+1)):(column(2*i))

我有一个有18列的文件。使用gnuplot,我想以如下方式绘制它们:1:2,3:4,5:6,…,17:18

我一直在尝试使用do循环,但我不知道如何将循环中的运行索引包含在列数中。我试过这样的方法:

对于[i=1:18]使用(2*(i-1)+1)绘制“numbers.dat”:(2*(i-1)+2)


感谢

将算术表达式的结果用作列索引,请使用
函数:

plot for [i=1:18] "numbers.dat" using (column(2*(i-1)+1)):(column(2*i))