필터 지우기
필터 지우기

CameraUpVectorMode resets itself to 'auto' on its own ... WHY???

조회 수: 7 (최근 30일)
Daniel Lyddy
Daniel Lyddy 2017년 10월 11일
답변: Rajesh Balagam 2017년 10월 17일
In R2015b, I have a 3D plot that I want to display with the y-axis pointing straight up, the z-axis pointing down and to the right, and the x-axis pointing up and to the right. I can accomplish this by first generating my 3D plot, then calling:
az = 232.5;
el = 30;
upVect = [0 1 0];
view(az, el);
set(gca, 'CameraUpVector', upVect);
This places the axes in the orientation I want, and it sets the 'CameraUpVectorMode' property in 'gca' correctly to 'manual.'
However ... if I do anything else to the figure (like issue another view(az, el) command, or try to spin it using the manual rotation tool), the figure 'resets' itself to the traditional z-axis up orientation, and 'CameraUpVectorMode' resets itself to 'auto.'
This is clearly unexpected behavior, in other words, a bug.
Has this bug been fixed in subsequent releases?

답변 (1개)

Rajesh Balagam
Rajesh Balagam 2017년 10월 17일
Thank you for your feedback on this issue. We will consider this for a fix in a future release of MATLAB.
At present, "view" and "rotate3d" MATLAB functions are designed to work with 3D graphs/plots and thus reset the camera upvector to positive z-axis orientation when used.
As a workaround, to rotate the figure in any direction, please use the camera toolbar's (View -> Camera Toolbar) "orbit" button after selecting the "No principal axis" button.
To programmatically rotate the scene, use "camorbit" function along with other cam* series of MATLAB functions.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by