@@ -141,7 +141,7 @@ def set_3d_properties(self, zs=0, zdir='z'):
141
141
xs = self .get_xdata ()
142
142
ys = self .get_ydata ()
143
143
144
- if not iterable (zs ):
144
+ if not cbook . iterable (zs ):
145
145
zs = np .ones (len (xs )) * zs
146
146
xyz = np .asarray ([xs , ys , zs ])
147
147
self ._verts3d = juggle_axes_vec (xyz , zdir )
@@ -181,7 +181,7 @@ def path_to_3d_segment(path, zs=0, zdir='z'):
181
181
def paths_to_3d_segments (paths , zs = 0 , zdir = 'z' ):
182
182
"""Convert paths from a collection object to 3D segments."""
183
183
184
- if not iterable (zs ):
184
+ if not cbook . iterable (zs ):
185
185
zs = np .ones (len (paths )) * zs
186
186
187
187
segments = []
@@ -401,7 +401,7 @@ def set_3d_properties(self, zs, zdir):
401
401
# Force the collection to initialize the face and edgecolors
402
402
# just in case it is a scalarmappable with a colormap.
403
403
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 ) )
405
405
self ._offsets3d = juggle_axes_vec (offsets , zdir )
406
406
self ._facecolor3d = self .get_facecolor ()
407
407
self ._edgecolor3d = self .get_edgecolor ()
0 commit comments