Changes in camera viewpoint parameters cannot be constrained within the axial coordinate area?
Afficher commentaires plus anciens
For example, I want to display my drawing in the lower left part of the axis area of the figure window, defining position=[0,0,0.5,0.5], but when I change the camera parameter CameraViewAngle, the drawing fills the entire figure area, any suggestions?
% define my axes visual region, bottom left
ax = axes(Position=[0.0,0.0,0.5,0.5]);
% my plot
[X, Y, Z] = sphere(30);
surf(ax, X, Y, Z,FaceColor="none",EdgeColor="black");
% my camera setting
ax.DataAspectRatio = [1,1,1];
ax.CameraPosition = [0,0,0];
ax.CameraTarget = [1,0,0];
ax.CameraUpVector = [0,0,1];
set camera parameter CameraViewAngle
ax.CameraViewAngle = 100
% ax.Projection = 'perspective';%'orthographic';%'perspective';
then chage view angle to 20,the area displayed in the figure window has also changed
ax.CameraViewAngle = 20
show result:

The position properties of the axes remains unchanged,while the drawing fills the entire figure area? What can I do to get my drawing within the [0,0,0.5,0.5] lower left area?
References:
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Camera Views dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



