Why do figures display simultaneously in MATLAB R2014b?

1 view (last 30 days)
In MATLAB R2014a, I used to create multiple figures with a single script. In R2014a, the figures would be created one after the other as the script executed. However, in MATLAB R2014b, I notice that the figures appear simultaneously, once the script has completed execution. I want to see the figures appear when the appropriate commands are called in the script, and not at the end of the execution. How can I do that?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 26 Aug 2014
If you create multiple figures in a script in R2014a and earlier, then MATLAB® attempts to wait for each figure to display on the screen before continuing to execute the script. Starting in R2014b, MATLAB does not wait for a figure to display before continuing to execute the script. Thus, the script might run to completion before the figures are displayed. This change is most noticeable for scripts that create multiple figures and perform long computations.
To force figures to display as they are created, use 'drawnow'.
figure
plot(1:10);
drawnow

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products


Release

R2014b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!