Gnuplot无变量“;暂停“;

Gnuplot无变量“;暂停“;,gnuplot,Gnuplot,使用以下gnuplot脚本 set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log | grep 'solving for p' | cut -d ' ' -f9 | tr -d ','" title 'p' with lines,\ pause 1 我得到以下错误: "residuals"

使用以下gnuplot脚本

set logscale y
set title "Residuals"
set ylabel 'Residual'
set xlabel 'Iteration'
plot "< cat log | grep 'solving for p' | cut -d ' ' -f9 | tr -d ','" title 'p' with lines,\
pause 1
我得到以下错误:

"residuals", line 6: undefined variable: pause

如何修复此问题?

您的plot命令不正确,因为该行以“,\”结尾,这意味着您的行正在继续,并且
pause
被视为传递给plot的变量。所以暂停并不存在


我建议删除“,\”

您的plot命令不正确,因为该行以“,\”结尾,这意味着您的行正在继续,并且
pause
被视为传递给plot的变量。所以暂停并不存在


我建议删除“,\”

马特的分析是正确的。然而,值得注意的是,在gnuplot 5中,用逗号终止“plot”命令会产生警告,但程序无论如何都会继续,这样序列就可以工作了。@Ethan,啊,格式化在那里抓住了我。我主要是指出“\”导致它继续到第二行。马特的分析是正确的。然而,值得注意的是,在gnuplot 5中,用逗号终止“plot”命令会产生警告,但程序无论如何都会继续,这样序列就可以工作了。@Ethan,啊,格式化在那里抓住了我。我主要是指出“\”导致它继续到第二行。
"residuals", line 6: undefined variable: pause