help-octave
[Top][All Lists]
Advanced

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

Re: Strange hold/plot behaviour


From: André Rabello dos Anjos
Subject: Re: Strange hold/plot behaviour
Date: Fri, 16 Feb 2001 18:32:04 -0200 (BRST)

Hi, 

        So, your suggestion brought me another doubt: I'm trying to
genearate encapsulated postscripts that will go into LaTeX documents. As
you say, the postscript genearated by hold/replot is actually creating
another page. But when you use eps, there is only 1 page (and the box of
course). So, what happens to the drawings? I sometimes can look at them
using gv, but sometimes I only see blanks. And I push reopen, then the
figure shows up.

        Is there an easy way to produce EPS figures that won't have all
this problems and use subplot() and hold?? Probably not with the
`postscript' drive, I would presume...

        I know I have different possibilities, but eps is really handy for
other purposes as well (includding printing).

        Cheers, André.

PS: How to re-scale a `postscript eps' plot? They go out _too_ small...

=======================================================
                 Residencial Mailbox
 André Rabello dos Anjos <address@hidden>
 Visit my homepage at: http://www.lps.ufrj.br/~rabello
=======================================================


On Fri, 16 Feb 2001, John W. Eaton wrote:

> On 16-Feb-2001, André Rabello dos Anjos <address@hidden> wrote:
> 
> |     I've experienced a strange behaviour while running octave to plot
> | some data (2.1.33). The data is made out of 2 2-dimensional vectors. I
> | plot one of the dimensions against the other for the first vector, hold on
> | and then plot the second vector. So, if I gset the terminal to x11, then
> | everything goes smooth and no problems at all happen, but if I just set it
> | to dump something into a file (postscript, png and gif), the plot only
> | gets the 1st vector. As you can see bellow, I ask for "key's", but not
> | even the key for the second vector is drawn. I've reproduced this many
> | times and looked back and forth to see anything I was missing... But I
> | couldn't find anything. Maybe one of you guys/girls could help em sorting
> | this out... Here's the piece of code I'm using:
> | 
> | [...]
> | 
> | The way around is to gset x11, plot and than replot with gset postscript,
> | what is not uniform with all the rest in octave. I should be allowed to
> | plot directly into postscript with no errors... Maybe this is a gnuplot
> | problem... It doesn't occur while using subplot().
> 
> The problem is that "hold" works by adding data to a graph (using
> replot ...), and gnuplot's PostScript driver does that by starting
> over on a new page.  So you probably really have multiple pages in
> your PostScript file, one for each line you draw.
> 
> The solution is what you already know.  Draw to some other device
> first, then replot to the file you want.
> 
> If you don't want to use the X11 screen for that, you can do something
> like
> 
>   gset term dumb
>   gset output "/dev/null"
> 
>   ## prepare plot ...
> 
>   gset output "myfile.ps"
>   gset term postscript
>   replot
> 
> and you won't have to look at the plots while they are being
> constructed.
> 
> Sorry, I don't think it is worth fixing this if we continue to use
> gnuplot (something I don't intend to do, btw, if I work on another
> Octave-like project in the future).
> 
> jwe
> 



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