help-octave
[Top][All Lists]
Advanced

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

How to plot multiple variables in scrolling window


From: jmb
Subject: How to plot multiple variables in scrolling window
Date: Thu, 10 Jul 2014 19:31:28 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

I am trying to make octave plot more than one variable in a
'pseudo-scrolling' manner using the code I found at:

http://octave.1599824.n4.nabble.com/plot-in-a-for-loop-td3331507.html
N = 200;
figure (1)
x = 0:(N-1);
y = rand(1, length(x));
plot(x(1), y(1));
axis([0 N 0 1]);
vh = get(gca,'children');
for i=1:length(x)
   set(vh, 'xdata',x(1:i), 'ydata', y(1:i));
   pause(10);
endfor

which works for one variable 'y'

Then I have tried some variations of the above for 2 variables, but have
been unsuccessful.  Can somebody suggest how it can be done?

I am using:
GNU Octave Version 3.2.4
GNU Octave License: GNU General Public License
Operating System: Linux 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22
21:01:03 UTC 2013 x86_64

Thanks in advance for any advice, or code snippets.




reply via email to

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