Skip to content

Commit 081b3e1

Browse files
WeatherGodtacaswell
authored andcommitted
FIX: Add get/set color methods for some 3d collections
closes #3370 We need to do an extra step to propagate the color information back to the 3D projections
1 parent 52761de commit 081b3e1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

+24
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,18 @@ def __init__(self, *args, zs=0, zdir='z', depthshade=True, **kwargs):
398398
super().__init__(*args, **kwargs)
399399
self.set_3d_properties(zs, zdir)
400400

401+
def set_facecolor(self, c):
402+
super().set_facecolor(c)
403+
self._facecolor3d = self.get_facecolor()
404+
405+
set_facecolors = set_facecolor
406+
407+
def set_edgecolor(self, c):
408+
super().set_edgecolor(c)
409+
self._edgecolor3d = self.get_edgecolor()
410+
411+
set_edgecolors = set_edgecolor
412+
401413
def set_sort_zpos(self, val):
402414
"""Set the position to use for z-sorting."""
403415
self._sort_zpos = val
@@ -485,6 +497,18 @@ def set_3d_properties(self, zs, zdir):
485497
self._sizes3d = self.get_sizes()
486498
self.stale = True
487499

500+
def set_facecolor(self, c):
501+
super().set_facecolor(c)
502+
self._facecolor3d = self.get_facecolor()
503+
504+
set_facecolors = set_facecolor
505+
506+
def set_edgecolor(self, c):
507+
super().set_edgecolor(c)
508+
self._edgecolor3d = self.get_edgecolor()
509+
510+
set_edgecolors = set_edgecolor
511+
488512
def do_3d_projection(self, renderer):
489513
xs, ys, zs = self._offsets3d
490514
vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)

0 commit comments

Comments
 (0)