How to set default aspect ratio of 2D-3D plot in Matlab
Show older comments
Hi ,
How can I set pbaspect([2.5 3.5 1]) in the startup.m file for every plot?
Thanks,
1 Comment
MarionJ
on 16 Feb 2018
Have you found a solution?
Answers (1)
set(groot,'defaultAxesPlotboxAspectRatio',[2.5,3.5,1]);
set(groot,'defaultAxesPlotboxAspectRatioMode','manual');
5 Comments
MarionJ
on 19 Feb 2018
Well, I've already tried this, unfortunately this does not work. When I check the properties with get(groot,...) they are configured 'auto' indeed; however when I plot a figure the aspectratio-property is 'manual' nevertheless. This drives me crazy!
Greg
on 19 Feb 2018
See updated answer.
MarionJ
on 20 Feb 2018
Yes, it's what I actually tried, and what does not work. https://de.mathworks.com/matlabcentral/answers/383033-change-default-properties-dataaspectratiomode-and-plotboxaspectratiomode-to-auto
Greg
on 20 Feb 2018
You hijacked somebody else's thread from 4 years ago, then changed it to the exact opposite question.
MarionJ
on 21 Feb 2018
Absolutely not. It's irrelevant if I want to set it to 'auto' or to 'manual' or to defined values, respectively. The question is how to...
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!