At this point the display should have disappeared, but a file
named test.ps should have appeared in your working directory.
The replot command is handy! To return `to normal', just gset
the term and replot.
Sometime ago I wrapped up these steps in the following .m file,
but did not realize it would be of general interest. If you find
it handy and pass it on, consider it GPL'ed. It differs from
the matlab print command in that there is no choice of output
formats - but who want anything other than postscript nowadays? :-)
% print to a postscirpt file
function print (file)
file = ["\"", file, "\""];
gset term postscript
gset ("output", file)
gset term x11