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

Skip to content

Commit 5b285d6

Browse files
committed
Correctly set depthshaded colours on 3D collections.
1 parent e95a990 commit 5b285d6

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
@@ -438,13 +438,13 @@ def do_3d_projection(self, renderer):
438438
fcs = (_zalpha(self._facecolor3d, vzs) if self._depthshade else
439439
self._facecolor3d)
440440
fcs = mcolors.to_rgba_array(fcs, self._alpha)
441-
self.set_facecolors(fcs)
441+
super().set_facecolor(fcs)
442442

443443
ecs = (_zalpha(self._edgecolor3d, vzs) if self._depthshade else
444444
self._edgecolor3d)
445445
ecs = mcolors.to_rgba_array(ecs, self._alpha)
446-
self.set_edgecolors(ecs)
447-
PatchCollection.set_offsets(self, np.column_stack([vxs, vys]))
446+
super().set_edgecolor(ecs)
447+
super().set_offsets(np.column_stack([vxs, vys]))
448448

449449
if vzs.size > 0:
450450
return min(vzs)
@@ -540,8 +540,8 @@ def do_3d_projection(self, renderer):
540540
fcs = mcolors.to_rgba_array(fcs, self._alpha)
541541
ecs = mcolors.to_rgba_array(ecs, self._alpha)
542542

543-
self.set_edgecolors(ecs)
544-
self.set_facecolors(fcs)
543+
super().set_edgecolor(ecs)
544+
super().set_facecolor(fcs)
545545
self.set_sizes(sizes)
546546
self.set_linewidth(lws)
547547

0 commit comments

Comments
 (0)