8000 Returning the Poly3DCollection when calling bar3d · matplotlib/matplotlib@b725f47 · GitHub
[go: up one dir, main page]

Skip to content

Commit b725f47

Browse files
committed
Returning the Poly3DCollection when calling bar3d
bar3d does not return the Poly3DCollection which is annoying if one wishes to update the bar plot; Without the modification, I feel I have to do : ax.bar3d( ...) col = ax.collections[-1] And then for animating : While(True): col.remove() ax.bar3d(...) col = ax.collections[-1] with the modification, I can merge the ax.bar3d(..); col = .. ; as col = ax.bar3d(...)
1 parent 0a4fe6d commit b725f47

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,6 +2427,8 @@ def bar3d(self, x, y, z, dx, dy, dz, color='b',
24272427
self.add_collection(col)
24282428

24292429
self.auto_scale_xyz((minx, maxx), (miny, maxy), (minz, maxz), had_data)
2430+
2431+
return col
24302432

24312433
def set_title(self, label, fontdict=None, loc='center', **kwargs):
24322434
ret = Axes.set_title(self, label, fontdict=fontdict, loc=loc, **kwargs)

0 commit comments

Comments
 (0)
0