Freezing a plot while updating data
17 views (last 30 days)
Show older comments
Does anyone know if there is an option that is essentially the opposite of drawnow that I can use to tell my plot not to draw until I next call drawnow? I have tried the limitrate flag for this, but that just slows it down which isn't good enough.
I am trying to change the CData of an image and then the colourmap and caxis range, but when I do this normally it briefly shows the new data with the old colourmap and range before flickering and updating fully. Inserting the limitrate drawnow option gets rid of the first problem, but I still get the flicker/jumping as it updates rather than a smooth transition from my original image with one colourmap and caxis range to a new plot with new colourmap and range.
7 Comments
Answers (1)
Walter Roberson
on 16 Apr 2018
No, you cannot do exactly that.
The provided way to prevent intermediate updates before you are ready is to set the object (figure probably) visible property to 'off'. Resizing and the like are postponed until the object visibility is turned on again.
Making a figure visible again triggers a drawnow.
If you take long enough to calculate the updated information then something might trigger the figure to disappear (since you did turn it invisible.) My experience with hg1 was that there was a short time window during which if you turned the visibility back on then the figure would not flicker off and back on.
0 Comments
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!