MATLAB: How to format YTick labels so that they will use superscripts

ytick label

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?

Best Answer

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