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?

 Respuesta aceptada

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

1 comentario

tmozdzen
tmozdzen el 20 de Mayo de 2015
Editada: tmozdzen el 20 de Mayo de 2015
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 20 de Mayo de 2015

Editada:

el 20 de Mayo de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by