1

I'm writing a script in the octave programming language that calls plot. When I open the octave console in interactive mode and paste the script in, gnuplot appears correctly. However, when I run the script from a command line via

octave ./myscript.m

all printf work, but no gnuplot window appears. This happens with as simple a script as

plot([0 1; 2 3])

Any ideas why this might be happening?

Thanks.

1
  • What system are you using? Windows or linux. If I memeber correctly octav pipes your commands via a file stored in /tmp/ (on Linux). Looking at those might give you a clue as to what's going on. Hmm, can't find a link for this though, will have a look Commented Mar 21, 2011 at 15:16

1 Answer 1

4

Try running the script with the --persist flag. This flag tells Octave to "go to interactive mode after
--eval or reading from a file named on the command line."

> octave --persist ./myscript.m
Sign up to request clarification or add additional context in comments.

1 Comment

That did it, though it'd be nice if I could get Octave to die and only gnuplot to persist...

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.