Graphic error with text annotations on app designer UIAxes

8 次查看(过去 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:

采纳的回答

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".)

更多回答(0 个)

类别

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

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by