@@ -225,41 +225,18 @@ def get_zaxis(self):
225225 get_zgridlines = _axis_method_wrapper ("zaxis" , "get_gridlines" )
226226 get_zticklines = _axis_method_wrapper ("zaxis" , "get_ticklines" )
227227
228- def _unit_cube (self , vals = None ):
229- minx , maxx , miny , maxy , minz , maxz = vals or self .get_w_lims ()
230- return [(minx , miny , minz ),
228+ def _transformed_cube (self , vals ):
229+ """Return cube with limits from *vals* transformed by self.M."""
230+ minx , maxx , miny , maxy , minz , maxz = vals
231+ xyzs = [(minx , miny , minz ),
231232 (maxx , miny , minz ),
232233 (maxx , maxy , minz ),
233234 (minx , maxy , minz ),
234235 (minx , miny , maxz ),
235236 (maxx , miny , maxz ),
236237 (maxx , maxy , maxz ),
237238 (minx , maxy , maxz )]
238-
239- def _tunit_cube (self , vals = None , M = None ):
240- if M is None :
241- M = self .M
242- xyzs = self ._unit_cube (vals )
243- tcube = proj3d ._proj_points (xyzs , M )
244- return tcube
245-
246- def _tunit_edges (self , vals = None , M = None ):
247- tc = self ._tunit_cube (vals , M )
248- edges = [(tc [0 ], tc [1 ]),
249- (tc [1 ], tc [2 ]),
250- (tc [2 ], tc [3 ]),
251- (tc [3 ], tc [0 ]),
252-
253- (tc [0 ], tc [4 ]),
254- (tc [1 ], tc [5 ]),
255- (tc [2 ], tc [6 ]),
256- (tc [3 ], tc [7 ]),
257-
258- (tc [4 ], tc [5 ]),
259- (tc [5 ], tc [6 ]),
260- (tc [6 ], tc [7 ]),
261- (tc [7 ], tc [4 ])]
262- return edges
239+ return proj3d ._proj_points (xyzs , self .M )
263240
264241 def set_aspect (self , aspect , adjustable = None , anchor = None , share = False ):
265242 """
@@ -487,8 +464,7 @@ def draw(self, renderer):
487464 super ().draw (renderer )
488465
489466 def get_axis_position (self ):
490- vals = self .get_w_lims ()
491- tc = self ._tunit_cube (vals , self .M )
467+ tc = self ._transformed_cube (self .get_w_lims ())
492468 xhigh = tc [1 ][2 ] > tc [2 ][2 ]
493469 yhigh = tc [3 ][2 ] > tc [2 ][2 ]
494470 zhigh = tc [0 ][2 ] > tc [2 ][2 ]
0 commit comments