How to reset axes plot upon pressing run button within GUI

3 次查看(过去 30 天)
I have a very simple GUI which plots a graph depending on users input into my gui axes.
Problem is that everytime I press calcuate instead of clearing the axes and plotting the new data. It simply plots on top
as you can see it adds another line on top.
I've tired
cla reset
and
delete (plot)
neiter of which work, any suggestions?

采纳的回答

Monica Roberts
Monica Roberts 2022-5-6
You could call cla with the uiaxes as the input:
cla(app.UIAxes) % Or whatever your uiaxes handle is called

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by