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?

 Accepted Answer

Is this what you mean?
x = 1:100;
y = x.^3;
semilogy(x,y)

1 Comment

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.

Sign in to comment.

More Answers (0)

Asked:

on 20 May 2015

Edited:

on 20 May 2015

Community Treasure Hunt

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

Start Hunting!