Graphic error with text annotations on app designer UIAxes

3 visualizaciones (últimos 30 días)
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:

Respuesta aceptada

Voss
Voss el 6 de Feb. de 2023
Editada: Voss el 6 de Feb. de 2023
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".)

Más respuestas (0)

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by