我想用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 \
我不知道是我的错误吗?你能告诉我吗?
谢谢
答案 0 :(得分:1)
您的绘图命令的长度约为3600个字符。我不确定是否有长度限制,或者至少必须超过10'000,因为我尝试了类似的命令,并使用了超过10'000个字符,但没有收到您的错误消息。
顺便说一句,如果您不知道,可以缩短几个关键字:using
到u
,title
到ti
,with
到w
,linespoints
至lp
,linewidth
至lw
,pointtype
至pt
和pointsize
至{ {1}}
我猜(正如Lorinczy Zsigmond已经提到的那样),您在ps
之后有一些“不可见”字符,它也可能是\
或empty space
。
一些合理的文本编辑器可以使“不可见”字符变为“可见”。检查同一行中TAB
之后是否有任何字符。
来自gnuplot手册。选中\
:
命令可以通过在每行末尾加上反斜杠()来结束几行输入。反斜杠必须是每行上的 last 字符。效果就像没有反斜杠和换行符。即,不暗示空格,也不终止评论。因此,注释掉一条连续的行注释掉整个命令(请参见注释)。但是请注意,如果在多行命令的某处发生错误,则解析器可能无法准确定位错误所在的位置,在这种情况下,不一定指向正确的行。