How can I get new plot on the same axes when the user put the new input and presses push button?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
VISHWAS CHAVAN
il 24 Gen 2017
Commentato: VISHWAS CHAVAN
il 24 Gen 2017
Hello, I am developing a gui in which I have given the push button and some inputs. After pressing push button plot will generate on the axes of the gui but the problem is occurring in the next step when I will again put the new value in the input then the plot is being overwrite by the old plot. How can I remove the old plot after putting the new inputs?
Thanks
4 Commenti
Adam
il 24 Gen 2017
If you want to clear all existing plots when you next press the button you need to put
hold( handles.plotAxes, 'off' )
at the start. Or
cla( handles.plotAxes )
Risposta accettata
Niels
il 24 Gen 2017
if you use
hold on
every next (new) plot will added to the old plot, so both/ all plots will be shown.
hold off % default option, only need to use if you used hold on before
so that every new plot automatically deletes the old one
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!