Clear image in GUI?

2 次查看(过去 30 天)
Kyle
Kyle 2011-7-10
评论: Yibiao 2015-2-19
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

采纳的回答

Robert Cumming
Robert Cumming 2011-7-10
cla(handles.im1)

更多回答(2 个)

Paulo Silva
Paulo Silva 2011-7-10
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
Thanks
It works like the cla(handles.im1)
Yibiao
Yibiao 2015-2-19
It works, thanks!

请先登录,再进行评论。


norfaizayu
norfaizayu 2012-1-30
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by