Ho to delete the image from the axes?
Show older comments
I want to remove the image from the axes(say axes1) upon clicking a button keeping the axes intact.
I have tried using
children=get(handles.axes1, 'children');
delete(children);
and other things but it completely removes the axes.
Can anyone help??
Thanx in advance
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 23 Dec 2013
Try
cla(handles.axes1)
2 Comments
Jean Bilheux
on 3 Feb 2014
I didn't think about that one ('cla') and it worked great for me !
Image Analyst
on 4 Feb 2014
But it clears more than just the image (which is what the original poster wanted to restrict it to). If you want to clear everything, then that's fine - it will work.
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!