@@ -51,7 +51,7 @@ class Axes3D(Axes):
51
51
_axis_names = ("x" , "y" , "z" )
52
52
Axes ._shared_axes ["z" ] = cbook .Grouper ()
53
53
54
- dist = _api .deprecate_privatize_attribute ("3.7 " )
54
+ dist = _api .deprecate_privatize_attribute ("3.6 " )
55
55
vvec = _api .deprecate_privatize_attribute ("3.7" )
56
56
eye = _api .deprecate_privatize_attribute ("3.7" )
57
57
sx = _api .deprecate_privatize_attribute ("3.7" )
@@ -160,6 +160,8 @@ def __init__(
160
160
self .fmt_zdata = None
161
161
162
162
self .mouse_init ()
163
+ self .figure .canvas .callbacks ._connect_picklable (
164
+ 'motion_notify_event' , self ._on_move )
163
165
self .figure .canvas .callbacks ._connect_picklable (
164
166
'button_press_event' , self ._button_press )
165
167
self .figure .canvas .callbacks ._connect_picklable (
@@ -917,13 +919,13 @@ def get_proj(self):
917
919
# Generate the view and projection transformation matrices
918
920
if self ._focal_length == np .inf :
919
921
# Orthographic projection
920
- viewM = proj3d .view_transformation (u , v , w , eye )
922
+ viewM = proj3d .view_transformation_uvw (u , v , w , eye )
921
923
projM = proj3d .ortho_transformation (- self ._dist , self ._dist )
922
924
else :
923
925
# Perspective projection
924
926
# Scale the eye dist to compensate for the focal length zoom effect
925
927
eye_focal = R + self ._dist * ps * self ._focal_length
926
- viewM = proj3d .view_transformation (u , v , w , eye_focal )
928
+ viewM = proj3d .view_transformation_uvw (u , v , w , eye_focal )
927
929
projM = proj3d .persp_transformation (- self ._dist ,
928
930
self ._dist ,
929
931
self ._focal_length )
@@ -1245,14 +1247,22 @@ def _set_view_from_bbox(self, bbox, direction='in',
1245
1247
def zoom_data_limits (self , scale_u , scale_v , scale_w ):
1246
1248
"""
1247
1249
Zoom in or out of a 3D plot.
1248
- Will scale the data limits by the scale factors, where scale_u,
1249
- scale_v, and scale_w refer to the scale factors for the viewing axes.
1250
- These will be transformed to the x, y, z data axes based on the current
1251
- view angles. A scale factor > 1 zooms out and a scale factor < 1 zooms
1252
- in.
1250
+ Will scale the data limits by the scale factors. These will be
1251
+ transformed to the x, y, z data axes based on the current view angles.
1252
+ A scale factor > 1 zooms out and a scale factor < 1 zooms in.
1253
+
1253
1254
For an axes that has had its aspect ratio set to 'equal', 'equalxy',
1254
1255
'equalyz', or 'equalxz', the relevant axes are constrained to zoom
1255
1256
equally.
1257
+
1258
+ Parameters
1259
+ ----------
1260
+ scale_u : float
1261
+ Scale factor for the u view axis (view screen horizontal).
1262
+ scale_v : float
1263
+ Scale factor for the v view axis (view screen vertical).
1264
+ scale_w : float
1265
+ Scale factor for the w view axis (view screen depth).
1256
1266
"""
1257
1267
scale = np .array ([scale_u , scale_v , scale_w ])
1258
1268
@@ -1276,6 +1286,15 @@ def scale_axis_limits(self, scale_x, scale_y, scale_z):
1276
1286
Keeping the center of the x, y, and z data axes fixed, scale their
1277
1287
limits by scale factors. A scale factor > 1 zooms out and a scale
1278
1288
factor < 1 zooms in.
1289
+
1290
+ Parameters
1291
+ ----------
1292
+ scale_x : float
1293
+ Scale factor for the x data axis.
1294
+ scale_y : float
1295
+ Scale factor for the y data axis.
1296
+ scale_z : float
1297
+ Scale factor for the z data axis.
1279
1298
"""
1280
1299
# Get the axis limits and centers
1281
1300
minx , maxx , miny , maxy , minz , maxz = self .get_w_lims ()
0 commit comments