Gnuplot:我的脚本似乎不错,但出现错误“无效字符\”

问题描述 投票:0回答:1

我想用AIX 7.2和Gnuplot 4.6创建一个Gnuplot脚本

我的脚本是:


set terminal png truecolor size 1950, 650  background rgb "#eff1f0"
set output "/home/tbenedet/GNUPLOT/used.png"
set datafile separator ';'

set size ratio 0.2
set bmargin at screen 0.2
unset key
set datafile separator ";"
set ylabel " MB BLOCK " font ",10" offset -1,0
set xlabel font ",10"
set xtics rotate by 45  offset -0.8,-9,-1.8


plot "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5

乍一看,我的脚本是正确的...但是当我尝试使用gnuplot myscript.txt运行它时,出现此错误:

plot "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \ using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \ 
                                                                                                                                                                           ^
"myscript.txt", line 14: invalid character \

我不知道是我的错误...您能告诉我吗?

谢谢

plot gnuplot aix
1个回答
0
投票

您的绘图命令的长度约为3600个字符。我不确定是否有长度限制,或者至少必须超过10'000,因为我尝试了类似的命令,并使用了超过10'000个字符,但没有收到您的错误消息。顺便说一句,如果您不知道,可以缩短一些关键字:usingutitletiwithwlinespoints至[C0 ],lplinewidthlwpointtypeptpointsize

我想(正如Lorinczy Zsigmond已经提到的那样),在ps之后有一些“不可见”字符,也可以是\empty space。一些合理的文本编辑器可以使“不可见”字符变为“可见”。检查同一行中TAB之后是否有任何字符。

来自gnuplot手册。检查\

命令可以通过在每行的末尾加上反斜杠()来结束几行输入。每行的反斜杠必须是last字符。效果就像没有反斜杠和换行符。即,不暗示空格,也不终止评论。因此,注释掉一条连续的行注释掉整个命令(请参见注释)。但是请注意,如果在多行命令的某处发生错误,则解析器可能无法准确定位错误所在的位置,在这种情况下,不一定指向正确的行。

© www.soinside.com 2019 - 2024. All rights reserved.