How do I delete all annotations on a figure but not do clf?

65 次查看(过去 30 天)
How do I delete all annotations on a Figure? I do not want to do "clf" since that loses attributes that I want to keep. Doing "cla" does not remove the annotations.

采纳的回答

Ritesh Chandna
Ritesh Chandna 2017-4-10
Please use the below command to delete all the annotations on a figure:
>>delete(findall(gcf,'type','annotation'))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by