how to type angstrom in legend?
145 次查看(过去 30 天)
显示 更早的评论
how to type angstrom in legend?
something like legend('2A', '3A', '4A')
0 个评论
回答(2 个)
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 ')'])
0 个评论
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.
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!