@@ -198,10 +198,10 @@ def convert_zunits(self, z):
198
198
def set_top_view (self ):
199
199
# this happens to be the right view for the viewing coordinates
200
200
# moved up and to the left slightly to fit labels and axes
201
- xdwl = 0.95 / self .dist
202
- xdw = 0.9 / self .dist
203
- ydwl = 0.95 / self .dist
204
- ydw = 0.9 / self .dist
201
+ xdwl = 0.95 / self ._dist
202
+ xdw = 0.9 / self ._dist
203
+ ydwl = 0.95 / self ._dist
204
+ ydw = 0.9 / self ._dist
205
205
# This is purposely using the 2D Axes's set_xlim and set_ylim,
206
206
# because we are trying to place our viewing pane.
207
207
super ().set_xlim (- xdwl , xdw , auto = None )
@@ -356,15 +356,15 @@ def set_box_aspect(self, aspect, *, zoom=1):
356
356
"""
357
357
if zoom <= 0 :
358
358
raise ValueError (f'Argument zoom = { zoom } must be > 0' )
359
- self .zoom = zoom
359
+ self ._zoom = zoom
360
360
361
361
if aspect is None :
362
362
aspect = np .asarray ((4 , 4 , 3 ), dtype = float )
363
363
else :
364
364
aspect = np .asarray (aspect , dtype = float )
365
365
_api .check_shape ((3 ,), aspect = aspect )
366
366
# default scale tuned to match the mpl32 appearance.
367
- aspect *= 1.8294640721620434 * self .zoom / np .linalg .norm (aspect )
367
+ aspect *= 1.8294640721620434 * self ._zoom / np .linalg .norm (aspect )
368
368
369
369
self ._box_aspect = aspect
370
370
self .stale = True
@@ -1009,7 +1009,7 @@ def view_init(self, elev=None, azim=None, roll=None, vertical_axis="z"):
1009
1009
The axis to align vertically. *azim* rotates about this axis.
1010
1010
"""
1011
1011
1012
- self .dist = 10 # The camera distance from origin. Behaves like zoom
1012
+ self ._dist = 10 # The camera distance from origin. Behaves like zoom
1013
1013
1014
1014
if elev is None :
1015
1015
self .elev = self .initial_elev
@@ -1084,7 +1084,7 @@ def get_proj(self):
1084
1084
1085
1085
# The coordinates for the eye viewing point. The eye is looking
1086
1086
# towards the middle of the box of data from a distance:
1087
- eye = R + self .dist * ps
1087
+ eye = R + self ._dist * ps
1088
1088
1089
1089
# TODO: Is this being used somewhere? Can it be removed?
1090
1090
self .eye = eye
@@ -1098,7 +1098,7 @@ def get_proj(self):
1098
1098
V [self ._vertical_axis ] = - 1 if abs (elev_rad ) > 0.5 * np .pi else 1
1099
1099
1100
1100
viewM = proj3d .view_transformation (eye , R , V , roll_rad )
1101
- projM = self ._projection (- self .dist , self .dist )
1101
+ projM = self ._projection (- self ._dist , self ._dist )
1102
1102
M0 = np .dot (viewM , worldM )
1103
1103
M = np .dot (projM , M0 )
1104
1104
return M
0 commit comments