Octave shows gnuplot in interactive mode but not from command line
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 ./myscr开发者_高级运维ipt.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.
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
精彩评论