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

조회 수: 39 (최근 30일)
John Pryce
John Pryce 2017년 4월 7일
댓글: Holden Tranquillo 2020년 2월 26일
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'))
  댓글 수: 2
John Pryce
John Pryce 2017년 4월 11일
Thank you. Readable, works, and simpler than any other method I found.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by