How to write _ in a plot legend?
조회 수: 50 (최근 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!