function print_me(filename) %this function will output the current plot as a postscript file %called 'filename' % %usage: % octave:1>a=[1 -1 1 -1]; % octave:2>plot(a); % octave:3>print_me('a_output.ps'); gset terminal postscript eval(sprintf("gset output '%s'",filename)); replot gset terminal x11 endfunction