How to keep aspect ratio fixed, when rotating 3D objects in GUI?
조회 수: 21 (최근 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!