How to reset axes plot upon pressing run button within GUI
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Logan Das
el 6 de Mayo de 2022
Comentada: Logan Das
el 6 de Mayo de 2022
I have a very simple GUI which plots a graph depending on users input into my gui axes.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/988980/image.png)
Problem is that everytime I press calcuate instead of clearing the axes and plotting the new data. It simply plots on top
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/988985/image.png)
as you can see it adds another line on top.
I've tired
cla reset
and
delete (plot)
neiter of which work, any suggestions?
0 comentarios
Respuesta aceptada
Monica Roberts
el 6 de Mayo de 2022
You could call cla with the uiaxes as the input:
cla(app.UIAxes) % Or whatever your uiaxes handle is called
Más respuestas (0)
Ver también
Categorías
Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!