how to write exponents in axes?
7 views (last 30 days)
Show older comments
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,
0 Comments
Accepted Answer
dpb
on 19 Aug 2013
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')
0 Comments
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!