How do I make sure 'text' fills the entire figure?
2 views (last 30 days)
Show older comments
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 Comment
Walter Roberson
on 25 Aug 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?
Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!