Scientific notation at y-axis with yticks/yticklabels

80 ビュー (過去 30 日間)
Mepe
Mepe 2021 年 6 月 8 日
回答済み: Joseph Cheng 2021 年 6 月 8 日
I want to change the notation of the y-axis using the commands "yticks" and
"yticklabels". But here I would like to use the scientific notation.
Is this changeable?

採用された回答

Joseph Cheng
Joseph Cheng 2021 年 6 月 8 日
from the looks of it the desired state is also plotting in a log10. you can change the current axis by
set(gca,'yscale','log')
or if you only desire to have 10^X exponent style axis ticks labeling then you can
y = rand(10,1);
figure(1),plot(y)
ax = gca;
ax.YAxis.Exponent = 2
ax =
Axes with properties: XLim: [0 10] YLim: [0 1] XScale: 'linear' YScale: 'linear' GridLineStyle: '-' Position: [0.1300 0.1100 0.7750 0.8150] Units: 'normalized' Show all properties

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by