1

With the following gnuplot script

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

and this version

$ gnuplot --version
gnuplot 4.6 patchlevel 2

I get the following error:

"residuals", line 6: undefined variable: pause

How can I fix that?

0

1 Answer 1

3

Your plot command is incorrect because the line ends with ",\" which means your line is continuing and pause is being treated as a variable passed to plot. So pause doesn't exist.

I suggest removing ",\".

Sign up to request clarification or add additional context in comments.

2 Comments

matt's analysis is correct. It is worth noting, however, that in gnuplot 5 terminating a 'plot' command with a comma produces a warning but the program will continue anyway so that sequence would work.
@Ethan, ahh, formatting caught me there. I was mainly pointing out the "\" causes it to continue onto the second line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.