필터 지우기
필터 지우기

superscript in xlabel when from array

조회 수: 2 (최근 30일)
Emily
Emily 2014년 8월 21일
편집: dpb 2014년 8월 21일
If I have e.g.:
ylabel(VarTex(1,VarComp),'FontSize',16,'FontName','Calibri','FontWeight','bold')
how can I make superscript parts of the text referred to appear as superscript in the axis label e.g. if the text in VarTex(1,VarComp) is 'Temperature oC' I need the 'o' to be superscript.
If I type in the command window:
Y=VarTex(1,VarComp)
I get:
Y =
'Temperature (°C)'
I have tried various things with 'Interpreter' but not getting anywhere. Does anybody know the syntax I would need to put in the ylabel line above to get superscript/subscript to appear as such thanks

답변 (1개)

dpb
dpb 2014년 8월 21일
편집: dpb 2014년 8월 21일
ylabel('Temperature (^{o}C)')
altho look better with
ylabel('Temperature (\circC)')
What release? I surely get no TeX rendition at the command line here w/ R2012b...

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by