Graphic error with text annotations on app designer UIAxes

3 ビュー (過去 30 日間)
Claudia De Clemente
Claudia De Clemente 2023 年 2 月 6 日
コメント済み: Voss 2023 年 2 月 7 日
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:

採用された回答

Voss
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".)
  2 件のコメント
Claudia De Clemente
Claudia De Clemente 2023 年 2 月 7 日
Thanks a lot!!
Voss
Voss 2023 年 2 月 7 日
You're welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by