How do I make sure 'text' fills the entire figure?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm writing Matlab code that other people will run on different OS, Matlab versions, screen resolutions, etc. Part of the code makes a figure with text only (it sounds silly, but it's useful). I want to make sure the text fills the entire figure, e.g. doesn't overflow the figure, starts at the left bound and ends at the right bound. How do I do this?
I tried using text's 'Extent' property, but this doesn't work since text characters remain the same size whatever the axes.
1 commentaire
Walter Roberson
le 25 Août 2017
? Text characters do not remain the same size in all screen resolutions. Not unless you are using MS Windows or OS-X (not Linux) and you specify the positions in "characters", in which case it becomes pretty much the same as if you had specified the positions in "points" (points are 1/72 of an inch.)
Is the idea that the text font size is to be scaled, or is the idea that more text or less is to be put up to fill the available space?
Réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!