Update figures and process callbacks
drawnow updates figures and processes any
pending callbacks. Use this command if you modify graphics objects
and want to see the updates on the screen immediately.
drawnow limitrate limits the number of updates to 20 frames per second.
If it has been fewer than 50 milliseconds since the last update, or if the
graphics renderer is busy with the previous change, then
drawnow discards the new updates. Use this command if you
are updating graphics objects in a loop and do not need to see every update on
the screen. Skipping updates can create faster animations. Pending callbacks are
processed, so you can interact with figures during animations.
drawnow nocallbacks defers callbacks, such as the
ButtonDownFcn callback, until the next full
drawnow command. Use this option if you want to prevent
callbacks from interrupting your code. Deferring callbacks temporarily disables
figure interactions, such as mouse clicks or resizing the figure. Deferring
callbacks does not affect animation speed.
drawnow limitrate nocallbacks limits the number of updates to 20 frames
per second and skips updates if the renderer is busy. This syntax also prevents
callbacks from interrupting your code, which temporarily disables figure
interactions.
drawnow update skips updates if the renderer is busy and defers
callbacks. This syntax is not recommended. Use the limitrate
option instead.
drawnow expose updates figures, but defers callbacks. This syntax is not
recommended. Use the nocallbacks option instead.
The nocallbacks option always adds
interrupting callbacks to the queue. If you want to discard interrupting
callbacks, then use the Interruptible and BusyAction properties
instead.