help-octave
[Top][All Lists]
Advanced

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

Hold on and hold off in octave-2.9.8


From: John W. Eaton
Subject: Hold on and hold off in octave-2.9.8
Date: Sat, 9 Sep 2006 16:09:35 -0400

On  9-Sep-2006, Joe Koski wrote:

| Hi all,
| 
| I have a loop in one of my scripts:
| 
| for i = 1:num_c2f
|   ifig = ifig + 1;
|   figure(ifig);
|   clg;
|   legend('off');
|   axis('auto');
|   title(['Coarse to Fine ',int2str(i),' vs. Signal']);
|   xlabel ("Time, s")
|   ylabel ("Amplitude")
|   hold on;
|   plot(t,x,'r'); 
|   plot(t,c2f(i,:),'b');
|   hold off;
| end
| 
| With octave-2.1.73, the "hold on" and "hold off" serve to superimpose the
| two plot commands onto one plot frame. With octave-2.9.8, only the second
| plot appears in the axes, and the first plot disappears. This is all on my
| Mac with octave builds from scratch on OS X 10.4.7, Xcode-2.4, etc.
| 
| Has the use of "hold on" changed?

It should not have changed.

I can't run your code above since I don't have all the data required,
but the following works for me:

  x = linspace (-10, 10, 200)';
  hold on
  plot (x, sin (x));
  plot (x, cos (x));
  hold off

Does this work for you?

jwe


reply via email to

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