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 Center および File Exchange2-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