Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
Closes #1079. Allow iterables for Line3DCollection
  • Loading branch information
WeatherGod committed Jun 29, 2013
commit 1f0c46cca1567c80174175ffd687442a4aa1043d
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