How to write _ in a plot legend?

조회 수: 50 (최근 30일)
도현 김
도현 김 2021년 2월 4일
댓글: 도현 김 2021년 2월 4일
xxx = {'a_b'}
plot(1:5)
legend(xxx)
>> result is
i want to 'a_b' in legend .......
How to write ??

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 2월 4일
Set the interpreter to 'none'
xxx = {'a_b'};
plot(1:5)
legend(xxx,'interpreter','none')
  댓글 수: 1
도현 김
도현 김 2021년 2월 4일
very very very very very very very very very Thank you !!!!
happy new year ~!~!

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Walter Roberson
Walter Roberson 2021년 2월 4일
legend(xxx, 'interpreter', 'none')

weikang zhao
weikang zhao 2021년 2월 4일
  1. change the Interpreter like other answers
  2. Tex has its own escape for _ :
legend('a\_b');

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by