Freezing a plot while updating data
Mostrar comentarios más antiguos
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 comentarios
Pramit Biswas
el 6 de Abr. de 2018
Pramit Biswas
el 6 de Abr. de 2018
Yes, that's true. I personally not an expert. Is it possible to create the plot handle first, then in a single step update the data (as described in the above link of an answer), so that no reason of flickering occurs? Also can you please check is refreshdata useful?
Adam
el 9 de Abr. de 2018
Adam
el 9 de Abr. de 2018
Adam
el 9 de Abr. de 2018
Pramit Biswas
el 16 de Abr. de 2018
Thanks for updates.
Respuestas (1)
Walter Roberson
el 16 de Abr. de 2018
0 votos
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.
Categorías
Más información sobre Graphics Performance en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!