setting the scale of the Y axis

In the above image, I'd like to change 10^1 to a more beautiful way, like 10_superscript(1).
Can anyone help me?
Thanks,
Zhong

回答 (1 件)

the cyclist
the cyclist 2013 年 2 月 8 日
編集済み: the cyclist 2013 年 2 月 8 日

0 投票

I'm confused. MATLAB doesn't normally do that, does it? Do you see "beautiful" exponents when you run this code?
x = 10.^(3*rand(100,1));
y = 3*rand(100,1);
figure
plot(x,y,'.')
set(gca,'XScale','log')
Also, it is is very strange that your y-scale runs
10 100 0.4 0.5, etc
Were those labels entered manually?
EDIT after zhang commented:
I think I better understand now. You want to manually enter tick labels and have them interpreted as LaTeX would. According to this support solution
that is not supported, but there is a workaround.
You might also find something in the File Exchange.

2 件のコメント

zhang
zhang 2013 年 2 月 8 日
Yes, I manually set them to 10^1 and 10^2
the cyclist
the cyclist 2013 年 2 月 8 日
I edited my answer since I think I have a better understanding of what you are trying to do.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

質問済み:

2013 年 2 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by