How do I format YTick labels so that they will use superscripts?

I have a log scale on the Y axis and I'd like to label the tick lines 10^-3 10^-2, etc instead of 0.001 0.01 etc. And I don't want the ^ character to be seen literally, but serve as a superscript indicator as in Latex. Is this possible?

 채택된 답변

Chad Greene
Chad Greene 2015년 5월 20일
Is this what you mean?
x = 1:100;
y = x.^3;
semilogy(x,y)

댓글 수: 1

tmozdzen
tmozdzen 2015년 5월 20일
편집: tmozdzen 2015년 5월 20일
Interesting. If I issue figure(7); clf(7); "hold on"; semilogy(...), it won't plot in semi-log. However, if I move the "hold on" statement after the first semilogy line, it will work fine. Strange.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

질문:

2015년 5월 20일

편집:

2015년 5월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by