How to include a character with a macron (horizontal bar) in a legend?
15 ビュー (過去 30 日間)
古いコメントを表示
I am trying to put a macron over an "s" in a legend string. I have tried LaTeX syntax, but it does not work. This is my code:
hLegend(3) = legend([h1, h2, h3], ...
'\it{r_{123}}', ...
'| \it{r_{123}} |', ...
'\it{$\bar{s}$_{123}}');
set(hLegend(3), 'interpreter','latex');
And this is the warning I get
Warning: Unable to interpret LaTeX string
"\it{r_{123}}"
Warning: Unable to interpret LaTeX string
"| \it{r_{123}} |"
Warning: Unable to interpret LaTeX string
"\it{$\bar{s}$_{123}}"
Any idea what I could be doing wrong?
0 件のコメント
採用された回答
Oleg Komarov
2011 年 9 月 1 日
plot(1:10)
h = legend('$\bar{s}$');
set(h,'interpreter','Latex','FontSize',18)
5 件のコメント
Oleg Komarov
2011 年 9 月 5 日
The thing about the font is a known issue, there are some workarounds on the Newsgroup or on CSSM directly.
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!