How to reset axes plot upon pressing run button within GUI

조회 수: 10 (최근 30일)
Logan Das
Logan Das 2022년 5월 6일
댓글: Logan Das 2022년 5월 6일
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
  댓글 수: 1
Logan Das
Logan Das 2022년 5월 6일
Yep that worked!
I've been putting the cla below my plot scipt instead of on top.
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by