@@ -51,9 +51,11 @@ 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.6" )
55
- vvec = _api .deprecate_privatize_attribute ("3.6" )
56
- eye = _api .deprecate_privatize_attribute ("3.6" )
54
+ dist = _api .deprecate_privatize_attribute ("3.7" )
55
+ vvec = _api .deprecate_privatize_attribute ("3.7" )
56
+ eye = _api .deprecate_privatize_attribute ("3.7" )
57
+ sx = _api .deprecate_privatize_attribute ("3.7" )
58
+ sy = _api .deprecate_privatize_attribute ("3.7" )
57
59
58
60
def __init__ (
59
61
self , fig , rect = None , * args ,
@@ -158,8 +160,6 @@ def __init__(
158
160
self .fmt_zdata = None
159
161
160
162
self .mouse_init ()
161
- self ._move_cid = self .figure .canvas .callbacks ._connect_picklable (
162
- 'motion_notify_event' , self ._on_move )
163
163
self .figure .canvas .callbacks ._connect_picklable (
164
164
'button_press_event' , self ._button_press )
165
165
self .figure .canvas .callbacks ._connect_picklable (
@@ -327,21 +327,21 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
327
327
self ._aspect = aspect
328
328
329
329
if aspect in ('equal' , 'equalxy' , 'equalxz' , 'equalyz' ):
330
- ax_idx = self ._equal_aspect_axis_indices (aspect )
330
+ ax_indices = self ._equal_aspect_axis_indices (aspect )
331
331
332
332
view_intervals = np .array ([self .xaxis .get_view_interval (),
333
333
self .yaxis .get_view_interval (),
334
334
self .zaxis .get_view_interval ()])
335
335
mean = np .mean (view_intervals , axis = 1 )
336
336
ptp = np .ptp (view_intervals , axis = 1 )
337
- delta = max (ptp [ax_idx ])
337
+ delta = max (ptp [ax_indices ])
338
338
scale = self ._box_aspect [ptp == delta ][0 ]
339
339
deltas = delta * self ._box_aspect / scale
340
340
341
341
for i , set_lim in enumerate ((self .set_xlim3d ,
342
342
self .set_ylim3d ,
343
343
self .set_zlim3d )):
344
- if i in ax_idx :
344
+ if i in ax_indices :
345
345
set_lim (mean [i ] - deltas [i ]/ 2. , mean [i ] + deltas [i ]/ 2. )
346
346
347
347
def _equal_aspect_axis_indices (self , aspect ):
@@ -986,7 +986,7 @@ def clear(self):
986
986
def _button_press (self , event ):
987
987
if event .inaxes == self :
988
988
self .button_pressed = event .button
989
- self .sx , self .sy = event .xdata , event .ydata
989
+ self ._sx , self ._sy = event .xdata , event .ydata
990
990
toolbar = getattr (self .figure .canvas , "toolbar" )
991
991
if toolbar and toolbar ._nav_stack () is None :
992
992
self .figure .canvas .toolbar .push_current ()
@@ -1087,7 +1087,7 @@ def _on_move(self, event):
1087
1087
if x is None or event .inaxes != self :
1088
1088
return
1089
1089
1090
- dx , dy = x - self .sx , y - self .sy
1090
+ dx , dy = x - self ._sx , y - self ._sy
1091
1091
w = self ._pseudo_w
1092
1092
h = self ._pseudo_h
1093
1093
@@ -1107,7 +1107,7 @@ def _on_move(self, event):
1107
1107
1108
1108
elif self .button_pressed in self ._pan_btn :
1109
1109
# Start the pan event with pixel coordinates
1110
- px , py = self .transData .transform ([self .sx , self .sy ])
1110
+ px , py = self .transData .transform ([self ._sx , self ._sy ])
1111
1111
self .start_pan (px , py , 2 )
1112
1112
# pan view (takes pixel coordinate input)
1113
1113
self .drag_pan (2 , None , event .x , event .y )
@@ -1120,7 +1120,7 @@ def _on_move(self, event):
1120
1120
self ._scale_axis_limits (scale , scale , scale )
1121
1121
1122
1122
# Store the event coordinates for the next time through.
1123
- self .sx , self .sy = x , y
1123
+ self ._sx , self ._sy = x , y
1124
1124
# Always request a draw update at the end of interaction
1125
1125
self .figure .canvas .draw_idle ()
1126
1126
@@ -1131,7 +1131,7 @@ def drag_pan(self, button, key, x, y):
1131
1131
p = self ._pan_start
1132
1132
(xdata , ydata ), (xdata_start , ydata_start ) = p .trans_inverse .transform (
1133
1133
[(x , y ), (p .x , p .y )])
1134
- self .sx , self .sy = xdata , ydata
1134
+ self ._sx , self ._sy = xdata , ydata
1135
1135
# Calling start_pan() to set the x/y of this event as the starting
1136
1136
# move location for the next event
1137
1137
self .start_pan (x , y , button )
0 commit comments