Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6530502

Browse files
author
Oscar Gustafsson
committed
Cleanup unit_cube-methods
1 parent 5b5154d commit 6530502

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -225,42 +225,19 @@ 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):
228+
def _tunit_cube(self, vals, M):
229229
minx, maxx, miny, maxy, minz, maxz = vals or self.get_w_lims()
230-
return [(minx, miny, minz),
230+
xyzs = [(minx, miny, minz),
231231
(maxx, miny, minz),
232232
(maxx, maxy, minz),
233233
(minx, maxy, minz),
234234
(minx, miny, maxz),
235235
(maxx, miny, maxz),
236236
(maxx, maxy, maxz),
237237
(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)
243238
tcube = proj3d._proj_points(xyzs, M)
244239
return tcube
245240

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
263-
264241
def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
265242
"""
266243
Set the aspect ratios.

0 commit comments

Comments
 (0)