Skip to content

Commit

Permalink
Merge pull request matplotlib#2172 from WeatherGod/mplot3d/iter_colle…
Browse files Browse the repository at this point in the history
…ctions

[SPRINT] Closes matplotlib#1079. Allow iterables for Line3DCollection
  • Loading branch information
pelson committed Jun 29, 2013
2 parents 96fb464 + 1f0c46c commit 11666e5
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 11666e5

Please sign in to comment.