italicize only a part of the legend

13 views (last 30 days)
hello
does anyone knows how to italicize only a part of my legend content with text interpretation?
thanks

Accepted Answer

Star Strider
Star Strider on 17 Mar 2024
Use \it to begin it an \rm to end it. If you are doing that in an sprintf call, use \\it and \\rm respectively.
text(0.4, 0.4, 'Italisize \itonly part\rm of a text object')
.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!