Adding text programmatically to a figure
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
dpb
il 3 Gen 2022
0 voti
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.
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
