help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving a multiplot as a single file


From: Miquel Cabanas
Subject: Re: saving a multiplot as a single file
Date: Thu, 18 Mar 2004 14:29:06 +0100
User-agent: Mutt/1.3.28i

hi,

On Thu, Mar 18, 2004 at 11:58:29AM +0000, general questions wrote:
> 
> I have previously saved single plots with the
> 'plot2ps' script below, but now I need to save
> stacked multiplots (7 plots down by 1 across),
> but this script doesn't work and I can't
> figure out how to save it.
> 
> function plot2ps(f)
>   gset terminal postscript landscape enhanced
>   replot;
>   gset terminal X11;
> endfunction
> 

(unless this problem has got fixed in more recent versions
of gnuplot) you are facing a limit of gnuplot, which cannot
change the terminal type when in multiplot mode.

As you can see above in the stripped down version of plot2ps(),
it sets the terminal to postscript, then replots the plot (which
sends the PS commands to the output file), and lasts it resets
the terminal to X11 so that your plots are displayed back again
on screen. This cannot be done in multiplot mode.

The only way to obtain a multiplot printout is to set the
terminal to postscript before entering into multiplot mode,
then running all plot commands in a batch so that the PS code
goes straight into the output file. For instance,


gset terminal postscript portrait
gset output "multiplot.ps"
multiplot (2,1)
mplot (x1,y1)
mplot (x2,y2)
closeplot
oneplot

Miquel

-- 
Miquel E Cabanas ------------------------------------------------------
SeRMN, Universitat Autonoma de Barcelona (address@hidden)
MRUI Software Manager (address@hidden)
------------------------------------------o-oo--ooo---ooo--oo-o--------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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