Skip to content

Commit e95a990

Browse files
WeatherGodQuLogic
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 5584ba7 commit e95a990

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,14 @@ def __init__(self, *args, zs=0, zdir='z', depthshade=True, **kwargs):
403403
super().__init__(*args, **kwargs)
404404
self.set_3d_properties(zs, zdir)
405405

406+
def set_facecolor(self, c):
407+
super().set_facecolor(c)
408+
self._facecolor3d = self.get_facecolor()
409+
410+
def set_edgecolor(self, c):
411+
super().set_edgecolor(c)
412+
self._edgecolor3d = self.get_edgecolor()
413+
406414
def set_sort_zpos(self, val):
407415
"""Set the position to use for z-sorting."""
408416
self._sort_zpos = val
@@ -491,6 +499,14 @@ def set_3d_properties(self, zs, zdir):
491499
self._linewidth3d = self.get_linewidth()
492500
self.stale = True
493501

502+
def set_facecolor(self, c):
503+
super().set_facecolor(c)
504+
self._facecolor3d = self.get_facecolor()
505+
506+
def set_edgecolor(self, c):
507+
super().set_edgecolor(c)
508+
self._edgecolor3d = self.get_edgecolor()
509+
494510
def do_3d_projection(self, renderer):
495511
xs, ys, zs = self._offsets3d
496512
vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)

0 commit comments

Comments
 (0)