Soyol
Soyol

Reputation: 793

Matlab: How to avoid italic font for plot labels when interpreter is latex?

let's say that one plots something and either for title or legend or labels uses interpreter as latex, by default the title or ... will be shown in italic, how can one suppress that?

for instance for y-axis label it is as below:

ylabel('$\frac{P_{shape}}{P_{circle}}$','FontSize', 28,'Interpreter','LaTex')

Upvotes: 1

Views: 3472

Answers (1)

Sardar Usama
Sardar Usama

Reputation: 19689

Your question is actually related to Latex and not related to MATLAB!

\mathrm is used for that purpose in Latex. Anyway, the following will achieve your desired result:

ylabel('$\mathrm{\frac{P_{shape}}{P_{circle}}}$','FontSize', 28,'Interpreter','LaTex')

Upvotes: 1

Related Questions