Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
Daniel Lyddy
Daniel Lyddy el 11 de Oct. de 2017
Respondida: Rajesh Balagam el 17 de Oct. de 2017
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?

Respuestas (1)

Rajesh Balagam
Rajesh Balagam el 17 de Oct. de 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.


Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.


Community Treasure Hunt

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

Start Hunting!

Translated by