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 a3c331d

Browse filesBrowse files
committed
Fix undefined variables
1 parent b168bed commit a3c331d
Copy full SHA for a3c331d

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+3
-3
lines changed

‎lib/mpl_toolkits/mplot3d/art3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/art3d.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def set_3d_properties(self, zs=0, zdir='z'):
141141
xs = self.get_xdata()
142142
ys = self.get_ydata()
143143

144-
if not iterable(zs):
144+
if not cbook.iterable(zs):
145145
zs = np.ones(len(xs)) * zs
146146
xyz = np.asarray([xs, ys, zs])
147147
self._verts3d = juggle_axes_vec(xyz, zdir)
@@ -181,7 +181,7 @@ def path_to_3d_segment(path, zs=0, zdir='z'):
181181
def paths_to_3d_segments(paths, zs=0, zdir='z'):
182182
"""Convert paths from a collection object to 3D segments."""
183183

184-
if not iterable(zs):
184+
if not cbook.iterable(zs):
185185
zs = np.ones(len(paths)) * zs
186186

187187
segments = []
@@ -401,7 +401,7 @@ def set_3d_properties(self, zs, zdir):
401401
# Force the collection to initialize the face and edgecolors
402402
# just in case it is a scalarmappable with a colormap.
403403
self.update_scalarmappable()
404-
offsets = np.vstack(self.get_offsets(), np.ones(len(verts)) * zs)
404+
offsets = np.vstack(self.get_offsets(), np.atleast_1d(zs))
405405
self._offsets3d = juggle_axes_vec(offsets, zdir)
406406
self._facecolor3d = self.get_facecolor()
407407
self._edgecolor3d = self.get_edgecolor()

0 commit comments

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