Effacer les filtres
Effacer les filtres

How can I use equations in x- and y-labels with common fonts.

16 vues (au cours des 30 derniers jours)
Danny
Danny le 29 Juin 2019
Commenté : KALYAN ACHARJYA le 29 Juin 2019
I like a defult font type that can be shown when I command
plot(blah-blah-blah);
xlabel('ABCD');
However, when I want to input some equations in a label, I use the following codes
plot(blah-blah-blah);
xlabel('Number of nodes, $\vert\mathcal{N}\vert$','Interpreter','latex');
What matters to me is the difference of the fonts.
Actually, I prefer the font for the above one to the font for the below one.
Is there a way to get the same font as the above with using latex formulae?
  2 commentaires
KALYAN ACHARJYA
KALYAN ACHARJYA le 29 Juin 2019
Considering you are pointing text font type, if not let me know?
t=1:.1:10;
figure, plot(exp(t));
xlabel('ABCD','FontName','Times New Roman');
t=1:.1:10;
figure, plot(exp(t));
xlabel('ABCD, $\vert\mathcal{N}\vert$','Interpreter','latex','FontName','Times New Roman');
KALYAN ACHARJYA
KALYAN ACHARJYA le 29 Juin 2019
Danny's Comment:
When the interpreter is tex, varios font can be applied.
In other words, the below codes give different results to me.
xlabel('ABCD, $\vert\mathcal{N}\vert$','Interpreter','tex','FontName','Times New Roman');
xlabel('ABCD, $\vert\mathcal{N}\vert$','Interpreter','tex','FontName','Helvetica');
However, once I set the interpreter to latex, the fontname is not applied.
In other words, the below codes give the same result.
xlabel('ABCD, $\vert\mathcal{N}\vert$','Interpreter','latex','FontName','Times New Roman');
xlabel('ABCD, $\vert\mathcal{N}\vert$','Interpreter','latex','FontName','Helvetica');

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by