MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / view_init

Method view_init

lib/mpl_toolkits/mplot3d/axes3d.py:1241–1316  ·  view source on GitHub ↗

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 and azimuth angles can be used. A roll angle of 0, 90, 180, or 270 deg wi

(self, elev=None, azim=None, roll=None, vertical_axis="z",
                  share=False)

Source from the content-addressed store, hash-verified

1239 return None
1240
1241 def view_init(self, elev=None, azim=None, roll=None, vertical_axis="z",
1242 share=False):
1243 """
1244 Set the elevation and azimuth of the Axes in degrees (not radians).
1245
1246 This can be used to rotate the Axes programmatically.
1247
1248 To look normal to the primary planes, the following elevation and
1249 azimuth angles can be used. A roll angle of 0, 90, 180, or 270 deg
1250 will rotate these views while keeping the axes at right angles.
1251
1252 ========== ==== ====
1253 view plane elev azim
1254 ========== ==== ====
1255 XY 90 -90
1256 XZ 0 -90
1257 YZ 0 0
1258 -XY -90 90
1259 -XZ 0 90
1260 -YZ 0 180
1261 ========== ==== ====
1262
1263 Parameters
1264 ----------
1265 elev : float, default: None
1266 The elevation angle in degrees rotates the camera above the plane
1267 pierced by the vertical axis, with a positive angle corresponding
1268 to a location above that plane. For example, with the default
1269 vertical axis of 'z', the elevation defines the angle of the camera
1270 location above the x-y plane.
1271 If None, then the initial value as specified in the `Axes3D`
1272 constructor is used.
1273 azim : float, default: None
1274 The azimuthal angle in degrees rotates the camera about the
1275 vertical axis, with a positive angle corresponding to a
1276 right-handed rotation. For example, with the default vertical axis
1277 of 'z', a positive azimuth rotates the camera about the origin from
1278 its location along the +x axis towards the +y axis.
1279 If None, then the initial value as specified in the `Axes3D`
1280 constructor is used.
1281 roll : float, default: None
1282 The roll angle in degrees rotates the camera about the viewing
1283 axis. A positive angle spins the camera clockwise, causing the
1284 scene to rotate counter-clockwise.
1285 If None, then the initial value as specified in the `Axes3D`
1286 constructor is used.
1287 vertical_axis : {"z", "x", "y"}, default: "z"
1288 The axis to align vertically. *azim* rotates about this axis.
1289 share : bool, default: False
1290 If ``True``, apply the settings to all Axes with shared views.
1291 """
1292
1293 self._dist = 10 # The camera distance from origin. Behaves like zoom
1294
1295 if elev is None:
1296 elev = self.initial_elev
1297 if azim is None:
1298 azim = self.initial_azim

Callers 15

__init__Method · 0.95
shareviewMethod · 0.95
_on_moveMethod · 0.95
test_bar3d_shadedFunction · 0.80
test_surface3d_maskedFunction · 0.80
test_axes3d_rotatedFunction · 0.80
test_cullingFunction · 0.80
test_axes3d_isometricFunction · 0.80

Calls 1

get_siblingsMethod · 0.45

Tested by 15

test_bar3d_shadedFunction · 0.64
test_surface3d_maskedFunction · 0.64
test_axes3d_rotatedFunction · 0.64
test_cullingFunction · 0.64
test_axes3d_isometricFunction · 0.64
test_shared_viewFunction · 0.64
test_rotateFunction · 0.64
test_computed_zorderFunction · 0.64