How can I display axis values as thousands, millions and billions instead of 10^3, 10^6 and 10^9?

조회 수: 11 (최근 30일)
LS,
I would like to make the y-axis of my plot to show 16.000.000 as 16 million instead of 1.6 x 10 ^ 7. Does someone know a solution?
Best regards,
Frits Hermans

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 5월 17일
One suggestion:
y=1e6*(1:5);
plot(y/1e6);
ylabel('Million');

추가 답변 (1개)

Daniel Shub
Daniel Shub 2011년 5월 17일
The ytick parameter controls where the tick marks are and the yticklabel controls the label. I am assuming you are using either semilogy or loglog to plot ...
y = logspace(1, 4, 100);
semilogy(y)
set(gca, 'ytick', [20, 200, 2000])
set(gca, 'yticklabel', {'20'; '2 hundred'; '2 thousand'})

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by