Skip to content

Commit c4de047

Browse files
Fix some failures
1 parent 14853d0 commit c4de047

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def do_3d_projection(self, renderer):
233233
xys = np.reshape(xys.T, shape)
234234
segments_2d = xys[:, :, 0:2]
235235
LineCollection.set_segments(self, segments_2d)
236-
minz = np.min(xys[:, :, 2])
236+
minz = np.min(xys[:, :, 2]) if xys.size > 0 else 1e9
237237
return minz
238238

239239
def draw(self, renderer, project=False):
@@ -262,7 +262,7 @@ def __init__(self, *args, **kwargs):
262262

263263
def set_3d_properties(self, verts, zs=0, zdir='z'):
264264
verts = np.hstack([verts, np.ones((len(verts), 1)) * zs])
265-
self._segment3d = juggle_axes_vec(verts, zdir)
265+
self._segment3d = juggle_axes_vec(verts.T, zdir)
266266
self._facecolor3d = Patch.get_facecolor(self)
267267

268268
def get_path(self):

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,11 +2340,11 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
23402340
if 'alpha' in kwargs:
23412341
p.set_alpha(kwargs['alpha'])
23422342

2343-
verts = np.hstack([verts, np.asarray(verts_zs)[:, np.newaxis]])
2343+
verts = np.vstack([list(zip(*verts)), verts_zs])
23442344

2345-
xs, ys, verts_zs = art3d.juggle_axes_vec(verts.T, zdir)
2345+
xs, ys, verts_zs = art3d.juggle_axes_vec(verts, zdir)
23462346
self.auto_scale_xyz(xs, ys, verts_zs, had_data)
2347-
2347+
23482348
return patches
23492349

23502350
def bar3d(self, x, y, z, dx, dy, dz, color=None,

0 commit comments

Comments
 (0)