[Top][All Lists]

[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) >"
> 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 "". With  no argument  it prints to
the printer  (assume is "|lpr"). Afterwards  it resets the terminal to



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

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])
    gset output "|lpr"
    disp("sending to printer");
gset output 
gset term X

reply via email to

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