フィルターのクリア

Can I change the way Matlab2020b determines default y limits of plots?

4 ビュー (過去 30 日間)
Hiroyuki Kato
Hiroyuki Kato 2020 年 10 月 14 日
コメント済み: Walter Roberson 2020 年 10 月 27 日
I recently switched from Matlab 2016b to 2020b and realized that these two versions use different methods to set default y limits of the plots.
In 2016b, Matlab automatically chose the y limit values with nice round figures. e.g., if the data distribution is between 0.49-0.74, it choses [0.4 0.8] as the y limits.
In contrast, 2020b does not seem to care whether the y limits are round figures or not. It uses y limits with obscure values that maximize the visibility of the data points. e.g. [0.46 0.77] in the above example.
I prefer having nice round figures for the y limits. Is there any way to change the way Matlab2020b determines y limits?
Thanks,
Hiroyuki

回答 (1 件)

Pratyush Roy
Pratyush Roy 2020 年 10 月 27 日
Hi,
The limits for the axis objects are set automatically in 2020b by default and hence it can take values which are not rounded.
As a possible workaround, you can set the 'YLimMode' property of the axis object to 'manual' to manually set the y-imits to rounded values.
You can go through the following link for further help:
  2 件のコメント
Hiroyuki Kato
Hiroyuki Kato 2020 年 10 月 27 日
I understand that 2020b automatically sets the y limits, and so did 2016b. My problem is that "the way it sets automatically" is obviously different from the old version. Is there any way I can go back to the old way? Setting the limits manually every time does not sound like a great idea...
Walter Roberson
Walter Roberson 2020 年 10 月 27 日
No there is not a way to change it to switch back to the old behavior.

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

カテゴリ

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

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by