I am doing a GUI which plots a cube when the user enters the dimension of the cube. But If i keep entering new dimensions, the old cube still stays at the display? Is there any way to delete the previous figure every time when new data is entered?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
matlablearner
le 7 Juil 2014
Modifié(e) : Star Strider
le 7 Juil 2014
I am doing a GUI which plots a cube when the user enters the dimension of the cube. But If i keep entering new dimensions, the old cube still stays at the display? Is there any way to delete the previous figure every time when new data is entered?
0 commentaires
Réponse acceptée
Star Strider
le 7 Juil 2014
Without seeing your code I don’t know what you’ve already done. Perhaps the drawnow function will do what you want. (There are links to its friends at the end of that page and in the menu to the left of the text in the online documentation page.)
2 commentaires
Star Strider
le 7 Juil 2014
Probably just after the patch call. See the documentation for details and Examples.
You will likely have to experiment to get the result you want.
Plus de réponses (1)
Ben11
le 7 Juil 2014
Using drawnow would refresh the plot and get rid of the old one; that might do the trick
0 commentaires
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!