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

23 Ansichten (letzte 30 Tage)
Danny
Danny am 29 Jun. 2019
Kommentiert: KALYAN ACHARJYA am 29 Jun. 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 Kommentare
KALYAN ACHARJYA
KALYAN ACHARJYA am 29 Jun. 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 am 29 Jun. 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');

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by