This is a really old question but it was the top result for me. Relevant for today's cloud services, here are ways to approach the problem:
figure ("visible", "off")
plot (1:10)
print output.png
If you don't want to work just with files, X11 can be forwarded for remote viewing. Run Octave remotely and display locally via x11 assumes the X11 libraries are installed and ready to go...so just add -X to ssh:
ssh -X remoteserver
To get X11 there in the first place, these articles:
suggest:
- Edit /etc/ssh/sshd_config and set
- X11Forwarding yes
- CentOS might need these instead:
- ForwardX11 yes
- ForwardX11Trusted yes
- $ sudo yum groupinstall "X Window System"
- or install the single packages you want
- $ export DISPLAY=localhost:10.0
- This variable is only missing if xauth isn't installed
- $ sudo yum install xauth
and just in case you indeed run into a GNUTERM error:
Octave Plotting Error suggests compiling gnuplot with X11 support and setting the environment before plotting anything:
$ (whatever installs) gnuplot --with-x11
Then in Octave:
#setenv("GNUTERM", "qt")
setenv("GNUTERM","X11")
plot(x,y)