Skip to content

Commit b1eb984

Browse files
committed
Correctly set depthshaded colours on 3D collections.
1 parent 6a1a6e9 commit b1eb984

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,13 @@ def do_3d_projection(self, renderer):
440440
fcs = (_zalpha(self._facecolor3d, vzs) if self._depthshade else
441441
self._facecolor3d)
442442
fcs = mcolors.to_rgba_array(fcs, self._alpha)
443-
self.set_facecolors(fcs)
443+
super().set_facecolor(fcs)
444444

445445
ecs = (_zalpha(self._edgecolor3d, vzs) if self._depthshade else
446446
self._edgecolor3d)
447447
ecs = mcolors.to_rgba_array(ecs, self._alpha)
448-
self.set_edgecolors(ecs)
449-
PatchCollection.set_offsets(self, np.column_stack([vxs, vys]))
448+
super().set_edgecolor(ecs)
449+
super().set_offsets(np.column_stack([vxs, vys]))
450450

451451
if vzs.size > 0:
452452
return min(vzs)
@@ -544,8 +544,8 @@ def do_3d_projection(self, renderer):
544544
fcs = mcolors.to_rgba_array(fcs, self._alpha)
545545
ecs = mcolors.to_rgba_array(ecs, self._alpha)
546546

547-
self.set_edgecolors(ecs)
548-
self.set_facecolors(fcs)
547+
super().set_edgecolor(ecs)
548+
super().set_facecolor(fcs)
549549
self.set_sizes(sizes)
550550
self.set_linewidth(lws)
551551

0 commit comments

Comments
 (0)