Bold Greek letters in matlab latex interpreter

Viewed 3024

I tried using bold font for the Greek letters in my axis labels in Matlab but they don't seem to work.

For example:

xlabel('\mathbf{\rho}','Interpreter','latex')

I've tried other commands such as \bf but still it doesn't work.

Does anyone know how to get around this?

Thanks!

2 Answers

Use equation notation (as you would need in LaTeX) $$ and \boldmath

xlabel('\boldmath$\rho$','Interpreter','latex')

\boldmath will make bold everything in the next equation after it, so if you want only only partly bold, then separate the equation

xlabel('\boldmath$\rho$ $_i$','Interpreter','latex')

If you want multiple things bold, the same. Separate the equation and add a \boldmath before each bold section.

You can use mbox to have everything in one single equation. Source

xlabel('$\sqrt{\mbox{\boldmath $\rho$}_i}$', 'Interpreter','latex')
Related