How to write _ in a plot legend?
显示 更早的评论
xxx = {'a_b'}
plot(1:5)
legend(xxx)
>> result is

i want to 'a_b' in legend .......
How to write ??
采纳的回答
更多回答(2 个)
weikang zhao
2021-2-4
- change the Interpreter like other answers
- Tex has its own escape for _ :
legend('a\_b');
类别
在 帮助中心 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
