how to write exponents in axes?

Hello every body,
I want to write some numbers with exponents on the horizontal axis, ie. 10^2, 10^3, ....
but I don't want the '^' sign to be showed. In other words, I want the exponent to be on the top of of the base without '^' sign.
Is there a way to do that?
(I have searched in many forums, but they just explain about how to write numbers with exponent and not the power sign itself.)
Thanks in advance,

 Respuesta aceptada

dpb
dpb el 19 de Ag. de 2013

0 votos

Can't directly; the axis object doesn't use TeX interpreter.
You'll have to use text w/ the right locations to write the desired tick labels instead of using the axes 'xticklabel' property.
PITA, granted, but that's the way it is...
To experiment, try
ha=axes;
set(gca,'xticklab',[])
ht=text(0.5, -0.05, '10^2','horizontalalign','center')

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 19 de Ag. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by