[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Save a plot to .ps
From: |
Daniel Heiserer |
Subject: |
Re: Save a plot to .ps |
Date: |
Tue, 25 May 1999 07:53:32 +0200 |
address@hidden wrote:
>
> >> I really wonder how I can convert an octave plot to a postscript. In MatLab
> >> I
> >> would do this with 4print4. In octave...? Does anyone know?
> >
> >
> > gset term postscript
> > gset output "myfile.ps"
> > replot
> >
> > (then you probably want to reset your term)
> > gset term x11
>
> Ok, thanks. I got this one plus all the pointers to the archive. There is only
> one question left :) In MatLab the 4print4 command is something like 4print
> -deps file.ps4 You notice? No brackets. In octave this seems to be possibe,
> too, as shown above. But what is the difference to a normal function
> definition. (I guess gset is internally recognized and handled, isn4t it?) Or
> is it possible to do this from a m-file? I would love to stick as close to
> MatLab style as possible. Any ideas?
I am in the list for about 1.5 years now. This is about the 10th time
somebody asks this question.
No wonder, it is important.
I think it is time to fix it.
I attached a m-file which is a workaround and was posted some months
ago.
What we would need for compatibility is a new function sceme matlab has:
"print arg1 arg2 arg3 ....."
Now is available:
"print(arg1,arg2,arg3)"
Could somebody, who know more than me do that?
What do you think?
Ones that is done, I think we would have a 99.9% braindead solution
soon. ;-)
Thanks daniel
--
Mit freundlichen Gruessen
Daniel Heiserer
-----
--------------------------------------------------------------
Dipl.-Phys. Daniel Heiserer, BMW AG, Knorrstrasse 147, 80788 Muenchen
Abteilung EK-20
Tel.: 089-382-21187, Fax.: 089-382-42820
mailto:address@hidden
## usage: PRINT("filename",terminal):
## * sends a copy of the current plot to a PostScript file
## * if filename is missing, pipe to "| lpr"
function print(file,terminal);
## $Id: print.m,v 1.3 1997/02/08 09:50:30 mstorti Exp mstorti $
if nargin==0
file="|lpr";
else
eval(['gset output "',file,'"']);
endif
# bugfix
if nargin < 2
gset term postscript color
replot
gset term X
replot
else
if terminal=='ps_'
gset term postscript color
replot
gset term X
replot
elseif terminal=='eps'
gset term postscript eps color
replot
gset term X
replot
elseif terminal=='pbm'
gset term pbm color
replot
gset term X
replot
end
end
endfunction