필터 지우기
필터 지우기

how to type angstrom in legend?

조회 수: 109 (최근 30일)
Lee
Lee 2015년 8월 19일
답변: Carlos Ortega 2018년 3월 23일
how to type angstrom in legend?
something like legend('2A', '3A', '4A')

답변 (2개)

Carlos Ortega
Carlos Ortega 2018년 3월 23일
Thanks! this is really an easy approach. I defined Ang as you suggested and then concatenated that variable in a label. Maybe someone would find helpful this example
Ang = char(197); xlabel(['Pore width (' Ang ')'])

Star Strider
Star Strider 2015년 8월 20일
편집: Star Strider 2015년 8월 20일
Probably the easiest way is to define it as:
Ang = char(197);
To produce a cell string for your legend, this works:
lgndstr = regexp(sprintf('%d%c ', [[1:3]', ones(3,1)*197]'), ' ', 'split');
legend(lgndstr(1:end-1))
producing:
'1Å' '2Å' '3Å'
The alternative is to use a LaTeX string and specify the 'latex' interpreter.

카테고리

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