help-octave
[Top][All Lists]
Advanced

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

Strange hold/plot behaviour


From: John W. Eaton
Subject: Strange hold/plot behaviour
Date: Fri, 16 Feb 2001 11:03:31 -0600

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]