[Top][All Lists]

[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,


my print.m file:  

  function print(file)

  if nargin < 1, file=''; end
  eval(['gset term postscript']); 
  eval(['gset output "',file,'"'])
  if nargin < 1, system(['lpr ',file]); end
  eval(['gset term x11']);
  if nargin < 1, system('rm'); 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]