[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making postscript files of the plots
From: |
Mario Storti |
Subject: |
Re: Making postscript files of the plots |
Date: |
Fri, 05 Dec 1997 11:29:49 -0300 |
> Hello,
>
> How can I make postscript files of the plots I make in Octave?
> I thought the command:
> "gset terminal postscript"
> would be enough, but it is not.
> This command only puts the postscript-file to my terminal.
> How can I 'catch' this output into a file.
> The command
> "plot(x,y) > file.ps"
> gives no satisfation.
>
> Johan Jacobs
I find handy this script "print.m". If you give an argument like in
> print("myfigure")
then it writes to file "myfigure.ps". With no argument it prints to
the printer (assume is "|lpr"). Afterwards it resets the terminal to
X11.
Cheers,
Mario
%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%
Mario Alberto Storti | Fax: (54)(42) 55.09.44 |
Grupo de Tecnologia Mecanica | Tel: (54)(42) 55.91.75 |
INTEC, Guemes 3450 - 3000 Santa Fe, Argentina |
Reply: address@hidden, http://venus.unl.edu.ar/gtm-eng.html |
================================================================
function print(file);
% PRINT("filename")
% sends a copy of the current plot to a PostScript file
% just PRINT sends a copy of the current plot to the printer
%$Id: print.m,v 1.3 1997/02/08 09:50:30 mstorti Exp mstorti $
gset term postscript
if nargin==1
eval(["gset output \"" file ".ps\""])
disp(["sending to file " file])
else
gset output "|lpr"
disp("sending to printer");
endif
replot
gset output
gset term X