help-octave
[Top][All Lists]
Advanced

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

Re: plot data on several figures


From: James R. Phillips
Subject: Re: plot data on several figures
Date: Thu, 3 Nov 2005 17:27:03 -0800 (PST)

--- Fabian Braennstroem wrote:

> Hi,
> 
> I am a little bit confused about plotting multiple dataset
> to several figures and print them to a e.g. postscript file.
> [...]
> The problem is that I get the 'curves' from figure(1) on
> figure(2) too. I thought using 'hold on/off' and 'figure'
> would avoid that!?
> And taking a look at the eps files, I get for every single
> plot an extra page, so that on the first page of 'pos1.eps'
> is just one plot, on the second two and on the last three.
> Is there a way to reduce the pages to one with all three
> plots?
> 
> Greetings!
> Fabian
> -- 

Yes, it is all pretty baffling to begin with.  Nothing works quite the way you
expect it, and you have to work around various issues.

If you read the m-file for figure, you'll see it really only works for graphic
display terminals, i.e., X11 and aqua.  You need something different for
plotting to postscript.

Here is what I have found works for an eps file.
===========
gset term push;
gset term postscript eps color;
gset output "/dev/null";

[various commands to create the first plot]

gset output "plot1.eps";
replot;
pause (1); # this often seems required to get all output properly captured
gset output "/dev/null";
clg;

[various commands to create the second plot]

gset output "plot2.eps";
replot;
pause(1);

gset term pop;
gset output;

============

I recommend epstool for adding "tiff 6 packbits" previews to the eps files.

If xfig is available, you might find it convenient to use the fig terminal, and
then use fig2dev to convert it to eps format.  This allows editing the figure
using xfig and then recreating the eps file.  fig2dev is part of the transfig
package on debian and cygwin.





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