help-octave
[Top][All Lists]
Advanced

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

Strange hold/plot behaviour


From: André Rabello dos Anjos
Subject: Strange hold/plot behaviour
Date: Fri, 16 Feb 2001 11:41:06 -0200 (BRST)

Hi *,
        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:

c.name = "effic.dat";
c.label = "b-;this run;";
efflist = list (c);
nmemb = 1; # the current number of itens to process!
c.name = "effic-4neural.dat";
c.label = "r-;best 4-quant. neural;";
efflist = append (efflist, c);
++nmemb; # don't forget to increment the number of itens to process...

gset key bottom right Left box 3 spacing 1.1 title "Legend"

# The output is encapsulated postscript (doens't work at all)
gset term postscript eps color;
gset output "efficiency.eps";

title("Compared Efficiencies from some tests");
xlabel("Jet background");
ylabel("Electron Efficiency");
grid;
for i = 1:nmemb
  entry = nth(efflist,i);
  eff = readdat(entry.name, 2);
  if i==1
    plot(25*(1-eff(2,:)),eff(1,:), entry.label);
  else
    hold on;
    plot(25*(1-eff(2,:)),eff(1,:), entry.label);
    hold off;
  endif
endfor

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().

                Regards to all, 
                                André.

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




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