How do I get a new line with the TEXT function using TeX formatting in MATLAB 7.2 (R2006a)?

96 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
To get a new line with TeX formatting, use “\newline” in the TEXT function.
Following is an example of how one can write two strings - “first line” and “second line”, on two different lines in the middle of an axes:
axes
text(0.5,0.5, '{first line \newlinesecond line}')

More Answers (0)

Categories

Find more on Labels and Annotations in Help Center and File Exchange

Products


Release

R2006a

Community Treasure Hunt

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

Start Hunting!