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
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
2011-9-9
0 个投票
One such contribution is:
1 个评论
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Grid Lines, Tick Values, and Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!