drawnow()
drawnow('limitrate')
drawnow limitrate
| Parameter | Description |
|---|---|
| limitrate | Limits figure updates to reduce rendering work during animation loops. |
drawnow flushes the event queue and updates the figure window.
drawnow('limitrate') and drawnow limitrate process pending callbacks but skip figure updates when the previous update was recent. This mode is useful in animation loops.
x = -pi:pi/20:pi;
plot(x, cos(x))
drawnow
title('Title Here ...')
grid on
x = linspace(0, 2*pi, 200);
h = plot(x, sin(x));
for k = 1:20
set(h, 'YData', sin(x + k / 10));
drawnow limitrate
end
| Version | Description |
|---|---|
| 1.0.0 | initial version |