How to write _ in a plot legend?
72 ビュー (過去 30 日間)
古いコメントを表示
xxx = {'a_b'}
plot(1:5)
legend(xxx)
>> result is

i want to 'a_b' in legend .......
How to write ??
0 件のコメント
採用された回答
Cris LaPierre
2021 年 2 月 4 日
Set the interpreter to 'none'
xxx = {'a_b'};
plot(1:5)
legend(xxx,'interpreter','none')
その他の回答 (2 件)
weikang zhao
2021 年 2 月 4 日
- change the Interpreter like other answers
- Tex has its own escape for _ :
legend('a\_b');
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!