function print
%PRINT	Send the graph currently on the screen to a local printer.
%	PRINT is an M-file that you may wish to customize to indicate
%	your printer type and destination.

% Apollo is different:
if strcmp(computer,'APOLLO')
	meta metatmp		% Put current plot into temporary metafile
	!gpp metatmp -dps	% Invoke GPP, creating device specific output
	delete metatmp.met	% Delete temporary metafile
	!prf -transparent metatmp.ps	% Spool output to printer
	return
end

% Unix is all the same:
t = fix(clock);
fname = ['mtmp' sprintf('%02.0f%02.0f%02.0f',t(4),t(5),t(6))]; % unique name
eval(['meta ' fname])			% Current plot to temporary metafile
gpp_cmd = ['gpp ' fname ' -dps'];	% gpp cmd and options
rm_cmd  = ['rm ' fname '.met'];		% remove temporary meta file
lpr_cmd = ['lpr -r -h ' fname '.ps'];	% print cmd with file remove
semi = ';';
eval(['!('   gpp_cmd   semi   rm_cmd   semi   lpr_cmd  ') &'])
