How do I make sure 'text' fills the entire figure?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2017-8-25
? 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?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!