Skip to content

Commit

Permalink
Closes matplotlib#1079. Allow iterables for Line3DCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
WeatherGod committed Jun 29, 2013
1 parent 5e8d808 commit 1f0c46c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/mpl_toolkits/mplot3d/art3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ def set_3d_properties(self, zs=0, zdir='z'):
ys = self.get_ydata()

try:
# If *zs* is a list or array, then this will fail and
# just proceed to juggle_axes().
zs = float(zs)
zs = [zs for x in xs]
except:
except TypeError:
pass
self._verts3d = juggle_axes(xs, ys, zs, zdir)

Expand Down Expand Up @@ -170,7 +172,7 @@ def set_segments(self, segments):
'''
Set 3D segments
'''
self._segments3d = segments
self._segments3d = np.asanyarray(segments)
LineCollection.set_segments(self, [])

def do_3d_projection(self, renderer):
Expand Down

0 comments on commit 1f0c46c

Please sign in to comment.