Adding text programmatically to a figure
Mostrar comentarios más antiguos
I have a figure with several subplots in it. I want to place a textbox with some text init which belongs to the entire figure. However, whenever I try to use the text command to place the text, it places it relative to the current subplot but not to the overall figure. How do I overcome this nuance?
Thanks in advance.
Respuesta aceptada
Más respuestas (1)
dpb
el 3 de En. de 2022
0 votos
text() is exclusively a child of an axes, not a figure. To write text outside the boundaries of an axis, use the annotation object instead.
Or, depending upon just what you want/need for this to contain, use tiledlayout with which you can have a shared title and axes labels. Those may or may not be sufficient for your purpose.
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
