y axis values - change the display

1 次查看(过去 30 天)
michael
michael 2021-10-24
评论: Simon Chan 2021-12-5
Hi,
I have values on y axis which ranges from 0 to 160000. The value for 80000 (for example) is displayed as 8 (*10^4)
How can I change so that the values would be displayed as non scientific number (i.e 80,000)

回答(1 个)

Simon Chan
Simon Chan 2021-10-24
编辑:Simon Chan 2021-10-24
Modify the yticklabel as follows:
% plot something
ax = gca;
yticklabels(arrayfun(@(x) sprintf('%d',x),ax.YTick,'uni',0))
  3 个评论
Simon Chan
Simon Chan 2021-12-5
Sorry, I don't have such Matlab version and hence unable to give you an answer.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by