mpl_toolkits.mplot3d.axes3d.Axes3D.view_init#
- Axes3D.view_init(elev=None,azim=None,roll=None,vertical_axis='z',share=False)[source]#
Set the elevation and azimuth of the Axes in degrees (not radians).
This can be used to rotate the Axes programmatically.
To look normal to the primary planes, the following elevation andazimuth angles can be used. A roll angle of 0, 90, 180, or 270 degwill rotate these views while keeping the axes at right angles.
view plane
elev
azim
XY
90
-90
XZ
0
-90
YZ
0
0
-XY
-90
90
-XZ
0
90
-YZ
0
180
- Parameters:
- elevfloat, default: None
The elevation angle in degrees rotates the camera above the planepierced by the vertical axis, with a positive angle correspondingto a location above that plane. For example, with the defaultvertical axis of 'z', the elevation defines the angle of the cameralocation above the x-y plane.If None, then the initial value as specified in the
Axes3Dconstructor is used.- azimfloat, default: None
The azimuthal angle in degrees rotates the camera about thevertical axis, with a positive angle corresponding to aright-handed rotation. For example, with the default vertical axisof 'z', a positive azimuth rotates the camera about the origin fromits location along the +x axis towards the +y axis.If None, then the initial value as specified in the
Axes3Dconstructor is used.- rollfloat, default: None
The roll angle in degrees rotates the camera about the viewingaxis. A positive angle spins the camera clockwise, causing thescene to rotate counter-clockwise.If None, then the initial value as specified in the
Axes3Dconstructor is used.- vertical_axis{"z", "x", "y"}, default: "z"
The axis to align vertically.azim rotates about this axis.
- sharebool, default: False
If
True, apply the settings to all Axes with shared views.