Hi,
Is there another way to clear image in axes beside using the following code?
cla(handles.im1,'reset')
If i use this, it even clears the ButtonDownFcn of my axes.
Thanks

 채택된 답변

추가 답변 (2개)

Paulo Silva
Paulo Silva 2011년 7월 10일

1 개 추천

Just delete the children of the current axes
delete(get(gca,'Children'))
The buttondownfcn of the axes remains unchanged

댓글 수: 4

Kyle
Kyle 2011년 7월 10일
i'm using a Clear button to clear off all image on the GUI. erm with ur code how to specify which axes to clear?
Paulo Silva
Paulo Silva 2011년 7월 10일
instead of gca insert the handle for the axes you want to clear.
Kyle
Kyle 2011년 7월 10일
Thanks
It works like the cla(handles.im1)
Yibiao
Yibiao 2015년 2월 19일
It works, thanks!

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

norfaizayu
norfaizayu 2012년 1월 30일

0 개 추천

i cannot run the source code. is it just put the coding?i have 3 axes to be clear in gui. so how can i clear it?

댓글 수: 1

Walter Roberson
Walter Roberson 2012년 1월 30일
Sorry, I am having difficulty understanding your question.

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

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

2011년 7월 10일

댓글:

2015년 2월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by