Superscript characters for tick marks

I would like to use superscript characters in labeling my tick marks on my axes. Matlab defaults to this for log plots, however, does not interpret Tex for tick marks when manually entered.
I would like to create a plot with the following x tick marks:
  • 1
  • 2
  • 10^1
  • 10^2
  • 10^3
  • 10^4
However, I would like the marks to have superscripts instead of the lame 1E1 or 1E2 label. I would also like to try to avoid tricking Matlab into writing these labels by reworking my x values to fall on a log plot and then tricking the labels to appear correct.
Is this possible?
Thanks,

답변 (2개)

Walter Roberson
Walter Roberson 2011년 9월 9일

0 개 추천

You will have to set() XTickLabel to the empty vector (or empty cell array). Then you will have to text() each of your required labels in to place, since text() does allow TeX and LaTex.
I think there are MATLAB File Exchange contributions that would do this work for you.
Wayne King
Wayne King 2011년 9월 9일

0 개 추천

댓글 수: 1

Walter Roberson
Walter Roberson 2011년 9월 9일
Thanks, Wayne; I need my chocolate fix for the day before venturing in to the Twisty Little Maze of File Exchange Contributions, all alike.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2011년 9월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by