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

Skip to content

Commit c128f0e

Browse files
committed
One more minor fix to get bar3d to accept empty inputs. Also added CHANGELOG entry.
1 parent 253a566 commit c128f0e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2011-06-28 3D versions of scatter, plot, plot_wireframe, plot_surface,
2+
bar3d, and some other functions now support empty inputs. - BVR
3+
14
2011-06-16 Added *bottom* keyword parameter for the stem command.
25
Also, implemented a legend handler for the stem plot.
36
- JJL

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ def _shade_colors(self, color, normals):
872872
colors = (0.5 + norm(shade)[:, np.newaxis] * 0.5) * color
873873
colors[:, 3] = alpha
874874
else:
875-
colors = color.copy()
875+
colors = np.asanyarray(color).copy()
876876

877877
return colors
878878

@@ -1366,6 +1366,7 @@ def bar3d(self, x, y, z, dx, dy, dz, color='b',
13661366
if len(x) != len(y) or len(x) != len(z):
13671367
warnings.warn('x, y, and z must be the same length.')
13681368

1369+
# FIXME: This is archaic and could be done much better.
13691370
minx, miny, minz = 1e20, 1e20, 1e20
13701371
maxx, maxy, maxz = -1e20, -1e20, -1e20
13711372

0 commit comments

Comments
 (0)