Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ab9fe2f

Browse filesBrowse files
authored
Merge pull request #14726 from anntzer/coordinfo
Trivial simplification to Axis3d._get_coord_info.
2 parents b34895d + ac2f0d0 commit ab9fe2f
Copy full SHA for ab9fe2f

File tree

Expand file treeCollapse file tree

1 file changed

+5
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-9
lines changed

‎lib/mpl_toolkits/mplot3d/axis3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axis3d.py
+5-9Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,11 @@ def get_rotate_label(self, text):
176176
return len(text) > 4
177177

178178
def _get_coord_info(self, renderer):
179-
minx, maxx, miny, maxy, minz, maxz = self.axes.get_w_lims()
180-
if minx > maxx:
181-
minx, maxx = maxx, minx
182-
if miny > maxy:
183-
miny, maxy = maxy, miny
184-
if minz > maxz:
185-
minz, maxz = maxz, minz
186-
mins = np.array((minx, miny, minz))
187-
maxs = np.array((maxx, maxy, maxz))
179+
mins, maxs = np.array([
180+
self.axes.get_xbound(),
181+
self.axes.get_ybound(),
182+
self.axes.get_zbound(),
183+
]).T
188184
centers = (maxs + mins) / 2.
189185
deltas = (maxs - mins) / 12.
190186
mins = mins - deltas / 4.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.