How to keep aspect ratio fixed, when rotating 3D objects in GUI?
19 次查看(过去 30 天)
显示 更早的评论
I know that you can fix the aspect ration by right clicking on the axes and choosing: Rotate Options > Fixed Aspect Ratio Axes. But I'd like my GUI to do this automatically without every time manually specifying that? Is there a way to problematically achieve this? (ex.: including a command in the opening function)
thanks
0 个评论
采纳的回答
Walter Roberson
2012-6-19
DataAspectRatio and DataAspectRatioMode are among the properties cleared when a cla() is done, whether implicitly or explicitly. cla() is done implicitly each time you invoke a high-level graphics routine such as plot() and you do not have "hold on" or "hold all" turned on for the axes.
Therefore, instead of setting the properties in your opening function, set the properties after you plot.
更多回答(4 个)
Sean de Wolski
2012-6-19
2 个评论
Walter Roberson
2012-6-19
Sean, you had "DaraAspectRatioMode" . How old did you say your kids were? ;-)
hana
2012-6-19
1 个评论
Sean de Wolski
2012-6-19
hmmm, so you have something like:
set(handles.axes1,'dataaspectratiomode','manual');
set(handles.axes1,'dataaspectratio',[1 1 1]);
and it still comes undone?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 3-D Scene Control 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!