How can I make a single letter or specific letters bold without using the latex interpreter for title, axis, and labels?
211 views (last 30 days)
Show older comments
Alessandro Maria Laspina
on 22 Nov 2021
Answered: Star Strider
on 22 Nov 2021
As the question states, I want to be able to have a label that only has in bold certain characters. I specifically do not want to use the latex interpreter, because it does not seem it is capable of switching fonts (Change Font in Latex Interpreter - MATLAB Answers - MATLAB Central (mathworks.com)). Even when making it bold, the font style of the latex interpreter just does not flow well with the rest of my document- the font is way too skinny. This is also true when I try to increase the font size.
0 Comments
Accepted Answer
Star Strider
on 22 Nov 2021
Se the Interpreter property in the text documentation. The default interpreter is 'tex', and it is possible to use it with any available font. (Apparently not all fonts are available in the online Run feature. It works correctly on my computer offline.)
figure
text(0.1, 0.7, '\bfThis is bold\rm', 'FontName','Times New Roman', 'FontSize',14)
text(0.3, 0.5, '\itThis is italic\rm', 'FontNAme','Forte', 'FontSize',16)
text(0.5, 0.1, '\bf\itThis is italic red bold\rm', 'FontNAme','Playbill', 'Color','r', 'FontSize',18)
.
0 Comments
More Answers (0)
See Also
Categories
Find more on Labels and Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!