Graphic error with text annotations on app designer UIAxes
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello everyone. I am designing a GUI with App Designer. I have a plot with text annotations on it; when I zoom in on a part of the plot, the text annotations are moved outside of the plot, on the panel, and remain visible. Is this a bug or is there a workaround? Thank you in advance for your help!
This is the original plot:
And this is what happens when I zoom in:
댓글 수: 0
채택된 답변
Voss
2023년 2월 6일
편집: Voss
2023년 2월 6일
This is the expected default behavior; by default text objects have their Clipping property set to 'off'. The Clipping property controls whether the text string is clipped when the text is outside the axes limits. (The axes properties Clipping and ClippingStyle control whether and how clipping is done, respectively.)
To avoid this, set the texts' Clipping to 'on', e.g., when you create them. (And you may want to set the axes ClippingStyle to 'rectangle', which looks better than the default '3dbox' on 2D axes, in my opinion, because it allows for partial clipping of the text, rather than "all-or-nothing".)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!