フィルターのクリア

format the y tick labels

5 ビュー (過去 30 日間)
Seldeeno
Seldeeno 2014 年 5 月 6 日
コメント済み: Seldeeno 2014 年 5 月 9 日
hello,
How can I format the y tick labels in e-notation? (note: I entered those exact labels as numbers in the form I want them to appear) but I still want them to appear in e-notation. Is there a way to do this when I edit the figure properties?
Thanks

採用された回答

Sara
Sara 2014 年 5 月 6 日
If you want to change the format of the y-axis:
y = get(gca,'ytick');
yy = cell(numel(y),1);
for i = 1:numel(y)
yy{i}=sprintf('%10.3e',y(i)); %%CHOOSE PRECISION
end
set(gca,'yticklabel',yy)
  16 件のコメント
Sara
Sara 2014 年 5 月 9 日
It's the:
'horiz', 'left'
command, try taking it away. Note, you may want to do:
set(gca,'fontsize',8)
so that all the ticks are of the same size.
Seldeeno
Seldeeno 2014 年 5 月 9 日
Sara, you are great. Thank you for your help :)

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

その他の回答 (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