[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PostScript print function
From: |
mduncan |
Subject: |
PostScript print function |
Date: |
Tue, 23 Jun 1998 15:51:18 -0500 (CDT) |
This is what seems to work for me. It's basically the same thing Jonathan Hill
described, but in a function. Without and input argument it just sends the
postscript directly to the printer via a temp file and a system call (you'd
replace the "lpr " with the appropriate system print command of, of course).
Otherwise it's written to the specified file. The plot is brought back to the
X term at the end, and the temp file (if any) is removed.
Hope it's useful,
mike
my print.m file:
function print(file)
if nargin < 1, file='tmp.ps'; end
eval(['gset term postscript']);
eval(['gset output "',file,'"'])
replot;
if nargin < 1, system(['lpr ',file]); end
eval(['gset term x11']);
replot;
if nargin < 1, system('rm tmp.ps'); end
----------------------------------
Mike Duncan
Planning Systems Inc.
Ph: 504-639-3537
Fx: 504-649-0480
E-Mail: address@hidden
Date: 23-Jun-98
Time: 14:45:18
----------------------------------
- PostScript print function,
mduncan <=