Clear image in GUI?
显示 更早的评论
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
2011-7-10
Just delete the children of the current axes
delete(get(gca,'Children'))
The buttondownfcn of the axes remains unchanged
4 个评论
Kyle
2011-7-10
Paulo Silva
2011-7-10
instead of gca insert the handle for the axes you want to clear.
Kyle
2011-7-10
Yibiao
2015-2-19
It works, thanks!
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
2012-1-30
Sorry, I am having difficulty understanding your question.
类别
在 帮助中心 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!