Center text on screen
Mostra commenti meno recenti
Very basic question, but how can I (exactly) center text on screen (or figure window)?
If I just use
text(.5,.5,'x'); axis off
the x is not centered on screen.
1 Commento
Rik
il 18 Feb 2019
This is actually much more tricky than you might think, since it is not possible to have the anker point of a text object in another place than the lower left corner.
If I recall correctly, there is a submission on the FEX that can be used to create non-overlapping annotations. You can probably use the tricks it uses there to find the length of the text itself (which might be different from the length of the text object itself).
Risposta accettata
Più risposte (0)
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!