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_Animation_Gnuplot - Fatal编程技术网

Loops 在“中”内绘制任意一组线;“为”而做;在gnuplot中

Loops 在“中”内绘制任意一组线;“为”而做;在gnuplot中,loops,animation,gnuplot,Loops,Animation,Gnuplot,我在一个两列文件中收集了数据,我想对这些数据进行动画处理。数据文件中的点以100个点为一组,一个接一个,如下所示: ... 98 0.34 99 .036 100 .40 1 .01 2 .05 ... reset set term gif animate set output "animate.gif" do for [i=0:49]{ plot "<(sed -n 'i*100+1,(i+1)*100p' data.dat)" using 1:2 with lines } s

我在一个两列文件中收集了数据,我想对这些数据进行动画处理。数据文件中的点以100个点为一组,一个接一个,如下所示:

...
98 0.34
99 .036
100 .40
1 .01
2 .05
...
reset
set term gif animate
set output "animate.gif"

do for [i=0:49]{
   plot "<(sed -n 'i*100+1,(i+1)*100p' data.dat)" using 1:2 with lines
}
set output
set term x11
我正在寻找一个gnuplot算法,它看起来像这样:

...
98 0.34
99 .036
100 .40
1 .01
2 .05
...
reset
set term gif animate
set output "animate.gif"

do for [i=0:49]{
   plot "<(sed -n 'i*100+1,(i+1)*100p' data.dat)" using 1:2 with lines
}
set output
set term x11
重置
设置术语gif动画
设置输出“animate.gif”
为[i=0:49]做的事{

绘图“好的,我想我得到了,因为我得到了我想要的,我改变了路线

plot "... lines

使用1:2绘制“data.dat”every::i*100+1::(i+1)*100
而且似乎效果不错。答案也在同一个链接中