octave-maintainers
[Top][All Lists]
Advanced

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

Re: more graphics changes.


From: John W. Eaton
Subject: Re: more graphics changes.
Date: Tue, 20 Mar 2007 12:55:18 -0400

On 19-Mar-2007, Søren Hauberg wrote:

| John W. Eaton skrev:
| > It would be helpful to me if people who have been using the new
| > graphics features could check that I haven't broken too many things.
| > Please report any problems that you find to this list.
| Currently it's hard to do complex animations because they "flicker" a 
| lot. To see what I'm talking about you can run the following code:
| 
| N = 500;
| iterations = 30;
| x = linspace(0, 20*pi, N);
| y = sin(x);
| 
| figure(1)
| for i = 1:iterations
|    clf
|    hold on
|    for j = 1:N-1
|      h = plot(x(j:j+1), y(j:j+1), 'o');
|      set(h, "color", rand(1,3));
|    endfor
|    hold off
|    drawnow # Needed until pause calls drawnow
|    pause(0.5)
| endfor
| 
| The problem seems to be that "clf" calls "drawnow" which means that each 
| iterations in the above code calls "drawnow" twice which causes the 
| "flickering" (is that even a word). Things seem to work for me if I 
| remove the call to "drawnow" in "clf" but since I don't know the 
| internals of the system I don't know if that'll break anything.

I removed the call to drawnow in clf.  That change should also improve
compatibility with you know what.

Thanks,

jwe



reply via email to

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