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.