How do I make sure 'text' fills the entire figure?

2 Ansichten (letzte 30 Tage)
Greg
Greg am 25 Aug. 2017
Kommentiert: Walter Roberson am 25 Aug. 2017
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 Kommentar
Walter Roberson
Walter Roberson am 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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by