File Exchange

image thumbnail

text3

version 1.0.0 (7.78 KB) by Michael Karch
Adds a text specified by str as 3D lines plot in the current axes.

12 Downloads

Updated 01 Oct 2020

View License

Adds a text specified by str as 3D lines plot in the current axes. The text is places with its lower left corner at location specified by x,y,z (which corresponds to 'HorizontalAlignment', 'left', 'VerticalAlignment', 'baseline' of MATLAB's text function). Default glyph height is approx 1 unit, text size can be scaled using 'scale' parameter. Text default orientation is in xy-plane. The orinatation can be modified using 'rz','ry' and 'rx' parameters. Note: rotation order is rz > ry > rx.
The True Type Font Simplex.ttf is implemented here. Note: only the most important glyphs are implemented. Instructions on how to add more glyphs included in description of function.

Cite As

Michael Karch (2020). text3 (https://www.mathworks.com/matlabcentral/fileexchange/80617-text3), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Mathworlds

"the glyphs are constructed via coordinates of the outlines, so, single line is not possible" ok thanks for the answer, this is what I meant and guess. But then how did you get your cover image in which this doesn't seem to appear ?

Michael Karch

Thanks Nicolas, the glyphs are constructed via coordinates of the outlines, so, single line is not possible. The figure comes from "Edit>Copy figure" option in MATLAB's figure window. When pasting to e.g. Word, it gives a nice vector image, which looks very smooth. Rendering in the figure window itself depends (as I understand) on your system's graphic settings.

Mathworlds

Pretty coll (big!) work, thank you. Is there a way / an option to get one single line text ? The ones I get always are two lines thick. I guess it is a matter of construction process. So I never manage to get the same rendering I you obtained in your cover image example.

Mathworlds

(last comment cancelled). I said : Pretty coll (big!) work, thank you. Is there a way / an option to get one single line text ? The ones I get always are two lines thick. I guess it is a matter of construction process.

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!