Clear image in GUI?

3 views (last 30 days)
Kyle
Kyle on 10 Jul 2011
Commented: Yibiao on 19 Feb 2015
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

Accepted Answer

Robert Cumming
Robert Cumming on 10 Jul 2011
cla(handles.im1)

More Answers (2)

Paulo Silva
Paulo Silva on 10 Jul 2011
Just delete the children of the current axes
delete(get(gca,'Children'))
The buttondownfcn of the axes remains unchanged
  4 Comments
Kyle
Kyle on 10 Jul 2011
Thanks
It works like the cla(handles.im1)
Yibiao
Yibiao on 19 Feb 2015
It works, thanks!

Sign in to comment.


norfaizayu
norfaizayu on 30 Jan 2012
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 Comment
Walter Roberson
Walter Roberson on 30 Jan 2012
Sorry, I am having difficulty understanding your question.

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!