Plot: x axis and y axis values with commas as 1000 separators

17 ビュー (過去 30 日間)
alpedhuez
alpedhuez 2020 年 5 月 23 日
編集済み: Tommy 2020 年 5 月 24 日
This is a question about values of x axis and y axis in the plot.
First,
tells how to disable scientific notations.
Then, the x axis and y axis will be like '1000000' that is harder to read. I want to have commas as 1000 separaters that is '1,000,000.' Please advise.

採用された回答

Tommy
Tommy 2020 年 5 月 24 日
編集済み: Tommy 2020 年 5 月 24 日
You can format the tick labels using the TickLabelFormat property of the axis. For example:
ax = axes('YScale','log');
plot(ax,1:10,logspace(3,6,10));
ax.YAxis.Exponent = 0;
ax.YAxis.TickLabelFormat = '%,.0f';
See here for details:
(edit) Taking a closer look at the answer you linked, what you need is the comma in the format.

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by