8000 Mplot3d/crashfixes by WeatherGod · Pull Request #1618 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Mplot3d/crashfixes #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 7, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"""

import warnings
from operator import itemgetter

import matplotlib.axes as maxes
from matplotlib.axes import Axes, rcParams
from matplotlib import cbook
Expand Down Expand Up @@ -244,16 +246,14 @@ def draw(self, renderer):
# Calculate projection of collections and zorder them
zlist = [(col.do_3d_projection(renderer), col) \
for col in self.collections]
zlist.sort()
zlist.reverse()
zlist.sort(key=itemgetter(0), reverse=True)
for i, (z, col) in enumerate(zlist):
col.zorder = i

# Calculate projection of patches and zorder them
zlist = [(patch.do_3d_projection(renderer), patch) \
for patch in self.patches]
zlist.sort()
zlist.reverse()
zlist.sort(key=itemgetter(0), reverse=True)
for i, (z, patch) in enumerate(zlist):
patch.zorder = i

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

if right is None and iterable(left):
if right is None and cbook.iterable(left):
left, right = left

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

if top is None and iterable(bottom):
if top is None and cbook.iterable(bottom):
bottom, top = bottom

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

if top is None and iterable(bottom):
if top is None and cbook.iterable(bottom):
bottom, top = bottom

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

old_lower,old_upper = self.get_zbound()
Expand Down
0