Change DEFAULT properties DataAspectRatioMode and PlotBoxAspectRatioMode to 'auto'

2 ビュー (過去 30 日間)
MarionJ
MarionJ 2018 年 2 月 16 日
編集済み: MarionJ 2018 年 2 月 22 日
How can I change the Default figure properties? In 2017a DataAspectRatioMode and PlotBoxAspectRatioMode were set to Auto by default. In 2017b it is by default set to Manual. I want to change it to Auto for all figures, not having to change it for each figure individually. There must be a way...
  3 件のコメント
Greg
Greg 2018 年 2 月 20 日
Post your full get(groot) line. And a snippet of your plotting code.
MarionJ
MarionJ 2018 年 2 月 21 日
I implement the get-command with
get(groot,'defaultAxesPlotboxAspectRatioMode')
get(groot,'defaultAxesDataAspectRatioMode')
And the response is ans = 'auto'
The plot-code is something like:
figure();
pdemesh(p,e,t)
And I have this problem since I changed from 2017a to 2017b.
Thanks a lot for helping me!

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

採用された回答

Greg
Greg 2018 年 2 月 21 日
Any groot defaults are just that: defaults. If a value is not overridden by the user, it remains default. Otherwise, the default value is ignored.
The pdemesh function calls either pdeplot or pdeplot3D to do the legwork. Both of these then have axis equal in them. Calling axis equal (or likely any input to the axis function other than auto) changes the aspect ratio, thereby negating the default values, and setting mode to manual.
  2 件のコメント
Greg
Greg 2018 年 2 月 21 日
Not sure why the behavior is different in R2017a and R2017b, but I did confirm I'm seeing the same thing you describe.
MarionJ
MarionJ 2018 年 2 月 22 日
編集済み: MarionJ 2018 年 2 月 22 日
Because axis equal is called in pdeplot R2017b, but not in R2017a. Thank you so much for your help!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by