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 8bdc2c6

Browse filesBrowse files
committed
Merge pull request #1618 from WeatherGod/mplot3d/crashfixes
Mplot3d/crashfixes
2 parents 084a94f + 0ce0659 commit 8bdc2c6
Copy full SHA for 8bdc2c6

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"""
1212

1313
import warnings
14+
from operator import itemgetter
15+
1416
import matplotlib.axes as maxes
1517
from matplotlib.axes import Axes, rcParams
1618
from matplotlib import cbook
@@ -244,16 +246,14 @@ def draw(self, renderer):
244246
# Calculate projection of collections and zorder them
245247
zlist = [(col.do_3d_projection(renderer), col) \
246248
for col in self.collections]
247-
zlist.sort()
248-
zlist.reverse()
249+
zlist.sort(key=itemgetter(0), reverse=True)
249250
for i, (z, col) in enumerate(zlist):
250251
col.zorder = i
251252

252253
# Calculate projection of patches and zorder them
253254
zlist = [(patch.do_3d_projection(renderer), patch) \
254255
for patch in self.patches]
255-
zlist.sort()
256-
zlist.reverse()
256+
zlist.sort(key=itemgetter(0), reverse=True)
257257
for i, (z, patch) in enumerate(zlist):
258258
patch.zorder = i
259259

@@ -568,7 +568,7 @@ def set_xlim3d(self, left=None, right=None, emit=True, auto=False, **kw):
568568
if kw:
569569
raise ValueError("unrecognized kwargs: %s" % kw.keys())
570570

571-
if right is None and iterable(left):
571+
if right is None and cbook.iterable(left):
572572
left, right = left
573573

574574
self._process_unit_info(xdata=(left, right))
@@ -623,7 +623,7 @@ def set_ylim3d(self, bottom=None, top=None, emit=True, auto=False, **kw):
623623
if kw:
624624
raise ValueError("unrecognized kwargs: %s" % kw.keys())
625625

626-
if top is None and iterable(bottom):
626+
if top is None and cbook.iterable(bottom):
627627
bottom, top = bottom
628628

629629
self._process_unit_info(ydata=(bottom, top))
@@ -677,7 +677,7 @@ def set_zlim3d(self, bottom=None, top=None, emit=True, auto=False, **kw):
677677
if kw:
678678
raise ValueError("unrecognized kwargs: %s" % kw.keys())
679679

680-
if top is None and iterable(bottom):
680+
if top is None and cbook.iterable(bottom):
681681
bottom, top = bottom
682682

683683
self._process_unit_info(zdata=(bottom, top))
@@ -1425,7 +1425,7 @@ def set_zbound(self, lower=None, upper=None):
14251425
.. versionadded :: 1.1.0
14261426
This function was added, but not tested. Please report any bugs.
14271427
"""
1428-
if upper is None and iterable(lower):
1428+
if upper is None and cbook.iterable(lower):
14291429
lower,upper = lower
14301430

14311431
old_lower,old_upper = self.get_zbound()

0 commit comments

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