Adding additional LaTeX support for plot axis labels
Afficher commentaires plus anciens
Matlab supports a lot of LaTeX for figure axis labels, titles, etc, but not ALL LaTeX commands.
For example when trying to use
xlabel('$\boldsymbol{\mu}$','interpreter','latex')
I get the error:
Warning: Error updating Text. Following is the chain of causes of
the error:
String must have valid interpreter syntax:
$\boldsymbol{\mu}$
because it doesn't support the \boldsymbol{} command. Is there a way of fixing this by adding/installing additional LaTeX command modules or anything?
Réponses (2)
Star Strider
le 18 Jan 2016
You can use the 'FontWeight' as a work-around in this instance, since you have only one item you want in bold:
xlabel('${\mu}$','interpreter','latex', 'FontWeight','bold')
Walter Roberson
le 19 Jan 2016
0 votes
Some of what you are trying to use is from packages not loaded for MATLAB. See http://uk.mathworks.com/matlabcentral/answers/241784-latex-matrix-when-publishing#answer_191856
Catégories
En savoir plus sur Axis Labels dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!