如何管理`;`gnuplot中的预期错误
在gnuplot4.4中绘制图形时,我遇到以下错误如何管理`;`gnuplot中的预期错误,gnuplot,Gnuplot,在gnuplot4.4中绘制图形时,我遇到以下错误 gnuplot> set style fill transparent pattern 2 noborder ^ "./clusterload_all.pg", line 16: ';' expected 还有一些错误如下: gdImageStringFT: Could not find/open font while printing string 45 with font
gnuplot> set style fill transparent pattern 2 noborder
^
"./clusterload_all.pg", line 16: ';' expected
还有一些错误如下:
gdImageStringFT: Could not find/open font while printing string 45 with font Arial
gnuplot> plot "cpu.dat" using 1:2 with lines title "CPU% total" lw 5 lc 1,
'' using 1:3 with lines title "MEM% total" lw 5 lc 2,
'' using 1:4 with lines title "CPU% for clmServer" lw 5 lc 6,
'' using 1:5 with lines title "MEM% for clmServer" lw 5 lc 10,
'' using 1:8 with boxes fill transparent pattern 2 title "1: Uninstall Licenses" lw 2 lc 5,
'' using 1:9 with boxes fill transparent pattern 2 title "2: Install Licenses" lw 2 lc 6,
'' using 1:10 with boxes fill transparent pattern 2 title "3: Query Installed Licenses" lw 2 lc 7,
'' using 1:11 with boxes fill transparent pattern 2 title "4: Creating Feature Codes" lw 2 lc 11,
'' using 1:12 with boxes fill transparent pattern 2 title "5: Register Feature Codes" lw 2 lc 3,
'' using 1:13 with boxes fill transparent pattern 2 title "6: Query Feature Codes" lw 2 lc 1,
'' using 1:14 with boxes fill transparent pattern 2 title "7: Unregister Feature Codes" lw 2 lc 21
^
"./clusterload_all.pg", line 29: ';' expected
任何人都可以帮我解决这个问题。要管理错误,您需要了解生成错误的行中发生了什么 Gnuplot解释器提供了一个帮助,用光标“
^
”对有问题的单词的第一个字母进行签名,并在可能找到它的地方写入行号(如果脚本加载了load“myscript.gp”
或命令行调用Gnuplot作为Gnuplot myscript.gp
)
词源可以是多种多样的,因为在这个冒犯性的词出现之前,语法似乎是可以接受的。让我举几个例子:
- 选项序列中的顺序不正确
plot "<seq 1 20" with lines using 0:($1) # before "using" after "with"
- 在gnuplot4.6.3中,我没有任何错误
- 在gnuplot linux版本4.4 patchlevel 0(最后一次修改于2010年3月)中,无错误
- 如果您避免使用透明功能,也可以避免旧版本(4.1.0)中的错误
…您可以随时更新它:-)它太旧了 更严重的是,如果您不能上传您使用的版本,您可以从旧的演示中获取有关过去语法的提示(即。。。或者从老的那个。通常有,同时,更难找到
ps>您可以从内部解释器中编写长的命令行,或者以更舒适的方式将其写入外部文件(脚本)。您可以在gnuplot中加载脚本,也可以在gnuplot解释器中使用命令
load./clusterload_all.pg
,也可以在shell提示符下使用命令行gnuplot-persist./clusterload_all.pg
调用脚本。我不打算清理该代码,请了解如何正确格式化代码,以便阅读。另外,你应该举一个简短的例子来说明你的问题。错误在第16行还是第29行?29号线在哪?并请减少用于调试的绘图命令。
gnuplot> set style fill transparent pattern 2 noborder
^
';' expected