Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/60.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
gnuplot的麻烦-获得双图_Gnuplot - Fatal编程技术网

gnuplot的麻烦-获得双图

gnuplot的麻烦-获得双图,gnuplot,Gnuplot,我编写了一个脚本,它根据命令行参数从数据文件中选择一个块。到目前为止,它一直运作良好。现在我得到的前26个块的图中有两组数据。数据文件应该有大约190个数据块。我已经思考和探索了一个小时,我仍然不知道为什么会发生这种情况。这是gnuplot脚本 gnuplot << EOF reset set terminal png small size 1280,480 set output "graph_$1.png" set yrange [-0.5:5.5] set autoscale x

我编写了一个脚本,它根据命令行参数从数据文件中选择一个块。到目前为止,它一直运作良好。现在我得到的前26个块的图中有两组数据。数据文件应该有大约190个数据块。我已经思考和探索了一个小时,我仍然不知道为什么会发生这种情况。这是gnuplot脚本

gnuplot << EOF
reset
set terminal png small size 1280,480
set output "graph_$1.png"
set yrange [-0.5:5.5]
set autoscale x
set lmargin 17
set label "SPILL" at -1,.5 right
set label "ON" at -1,1 right
set label "OFF" at -1,0 right
set label "DATA" at -1,2.5 right
set label "CLOCK" at -1,4.5 right
set xtics in scale .1 4 format ""
set grid
unset ytics
set key at -1,3.75 right
plot 'plotting' using 0:1 every :::$1::$1 title 'Results' with lines lt 1 lw 2,     \
 ''            using 0:2 every :::$1::$1 notitle  with lines lt 1 lw 2,         \
 ''            using 0:3 every :::$1::$1 title 'Expected' with lines lt 3 lw 3, \
 ''            using 0:4 every :::$1::$1 notitle with lines lt 3 lw 3,          \
 ''            using 0:5 every :::$1::$1 notitle with lines lt -1 lw 3
EOF

gnuplot你所说的两组数据是什么意思?看起来你的绘图应该有5组数据…是的,有5条线被绘制出来。所以说两组数据,我的意思是有10条线被绘制,其中一组五条线被绘制在另一组五条线之上。那么线的颜色/线型呢?这些是一致的吗?在我看来,一定是发生了什么事情,从您的数据文件中删除了一个空行或其他东西。。。(或者添加了一个空行——或者您的数据文件中有nan,您可以
grep
grep-in-nan
))