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

10 visualizzazioni (ultimi 30 giorni)
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?

Risposte (1)

Rajesh Balagam
Rajesh Balagam il 17 Ott 2017
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.

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by