How can I use equations in x- and y-labels with common fonts.
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
KALYAN ACHARJYA
il 29 Giu 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
il 29 Giu 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');
Risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!