How can I use equations in x- and y-labels with common fonts.
11 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
KALYAN ACHARJYA
2019 年 6 月 29 日
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
2019 年 6 月 29 日
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');
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!