How can I make a single letter or specific letters bold without using the latex interpreter for title, axis, and labels?

7 views (last 30 days)
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.

Accepted Answer

Star Strider
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)
.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!