Freezing a plot while updating data
14 次查看(过去 30 天)
显示 更早的评论
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.
回答(1 个)
Walter Roberson
2018-4-16
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!