';:';打印多列数据文件时,gnuplot中应有错误
绘图文件_bin.p';:';打印多列数据文件时,gnuplot中应有错误,gnuplot,Gnuplot,绘图文件_bin.p 1 #Chart properties 2 set title "Cumulative binning" 3 set terminal svg size 1200,1800 4 set out '/ethCfmTopo/2way_delay/data/spoke-ntp/cumulative_binning.svg' 5 set multiplot layout 10,1 title "Multiplot" 6 set autoscale y 7 set au
1 #Chart properties
2 set title "Cumulative binning"
3 set terminal svg size 1200,1800
4 set out '/ethCfmTopo/2way_delay/data/spoke-ntp/cumulative_binning.svg'
5 set multiplot layout 10,1 title "Multiplot"
6 set autoscale y
7 set autoscale x
8 set ylabel "Iterations"
9 set xlabel "Round trip ms"
10 set style data histogram
11 set style fill solid border
12 set xtics scale 0 nomirror rotate by -45
13 plot for [COL=2:9] '/ethCfmTopo/2way_delay/data/spoke-ntp/data_binningbin.log' using COL:xticlabels(1) title columnheader, for [COL=2:9] '' using 0:COL:COL w labels title columnheader
在运行上述代码时,我得到了“:”预期错误,在许多论坛中搜索了它,但没有得到任何线索。有人能帮忙吗 错误输出 下面是我的数据文件:
至少更新到gnuplot 4.4.0。这里添加了对迭代的支持(绘制[COL=2:9]…)。您正在运行哪个版本?我在
版本5.0 patchlevel 3上没有收到此类错误版本4.6.7也不会产生此错误。我怀疑您运行的是比绘图更旧的语法版本,它不确定如何解释[COL=2:9]
表达式。你能升级到新版本吗?谢谢你的建议,我正在使用gnuplot 4.2 patchlevel 6。将对其进行升级。“绘图为[]”循环仅在gp4.4中引入。顺便说一句,请在发布之前简化您的问题,您应该已经开始[i=1:3]x*i
的绘图。
#gnuplot plotFile_bin.p
plot for [COL=2:9] '/ethCfmTopo/2way_delay/data/spoke-ntp/data_binningbin.log' using COL:xticlabels(1) title columnheader, for [COL=2:9] '' using 0:COL:COL w labels title columnheader
^
"plotFile_bin.p", line 13: ':' expected
0 0 0 0 0 0 0 0 0
1.01-1.1 0 0 0 0 0 0 0 0
1.1-1.2 1 2 4 6 0 2 3 3
1.2-1.3 173 168 188 248 189 234 206 216
1.3-1.4 1529 1638 1755 1765 1816 1842 1683 1662
1.4-1.5 785 671 546 463 479 408 597 600
1.5-1.6 1 4 0 1 5 3 3 0
1.6-1.7 1 0 0 0 0 0 0 0
1.7-1.8 1 1 1 2 3 0 0 1
1.8-1.9 2 0 4 1 3 3 0 3
1.9-2 0 1 0 2 4 1 0 2
2-2.3 1 1 0 0 0 0 1 0
2.3-2.6 0 0 1 0 0 0 0 0
2.6-3 0 0 0 0 0 0 0 0
3-4 0 0 0 0 0 0 1 0
4-5 1 0 0 0 0 0 0 0
5-7 0 0 0 0 0 0 0 0
7-10 1 1 1 1 0 0 0 1
10-16 4 13 0 9 0 7 6 11
16-21 0 0 0 2 1 0 0 1
21-31 0 0 0 0 0 0 0 0
>31 0 0 0 0 0 0 0 0