@@ -435,6 +435,32 @@ def __init__(self, *args, zs=0, zdir='z', depthshade=True, **kwargs):
435435 super ().__init__ (* args , ** kwargs )
436436 self .set_3d_properties (zs , zdir )
437437
438+ def get_depthshade (self ):
439+ return self ._depthshade
440+
441+ def set_depthshade (self , depthshade ):
442+ """
443+ Set whether depth shading is performed on collection members.
444+
445+ Parameters
446+ ----------
447+ depthshade : bool
448+ Whether to shade the patches in order to give the appearance of
449+ depth.
450+ """
451+ self ._depthshade = depthshade
452+ self .stale = True
453+
454+ def set_facecolor (self , c ):
455+ # docstring inherited
456+ super ().set_facecolor (c )
457+ self ._facecolor3d = self .get_facecolor ()
458+
459+ def set_edgecolor (self , c ):
460+ # docstring inherited
461+ super ().set_edgecolor (c )
462+ self ._edgecolor3d = self .get_edgecolor ()
463+
438464 def set_sort_zpos (self , val ):
439465 """Set the position to use for z-sorting."""
440466 self ._sort_zpos = val
@@ -462,13 +488,13 @@ def do_3d_projection(self, renderer):
462488 fcs = (_zalpha (self ._facecolor3d , vzs ) if self ._depthshade else
463489 self ._facecolor3d )
464490 fcs = mcolors .to_rgba_array (fcs , self ._alpha )
465- self . set_facecolors (fcs )
491+ super (). set_facecolor (fcs )
466492
467493 ecs = (_zalpha (self ._edgecolor3d , vzs ) if self ._depthshade else
468494 self ._edgecolor3d )
469495 ecs = mcolors .to_rgba_array (ecs , self ._alpha )
470- self . set_edgecolors (ecs )
471- PatchCollection .set_offsets (self , np .column_stack ([vxs , vys ]))
496+ super (). set_edgecolor (ecs )
497+ super () .set_offsets (np .column_stack ([vxs , vys ]))
472498
473499 if vzs .size > 0 :
474500 return min (vzs )
@@ -523,6 +549,42 @@ def set_3d_properties(self, zs, zdir):
523549 self ._linewidth3d = self .get_linewidth ()
524550 self .stale = True
525551
552+ def get_depthshade (self ):
553+ return self ._depthshade
554+
555+ def set_depthshade (self , depthshade ):
556+ """
557+ Set whether depth shading is performed on collection members.
558+
559+ Parameters
560+ ----------
561+ depthshade : bool
562+ Whether to shade the patches in order to give the appearance of
563+ depth.
564+ """
565+ self ._depthshade = depthshade
566+ self .stale = True
567+
568+ def set_facecolor (self , c ):
569+ # docstring inherited
570+ super ().set_facecolor (c )
571+ self ._facecolor3d = self .get_facecolor ()
572+
573+ def set_edgecolor (self , c ):
574+ # docstring inherited
575+ super ().set_edgecolor (c )
576+ self ._edgecolor3d = self .get_edgecolor ()
577+
578+ def set_sizes (self , sizes , dpi = 72.0 ):
579+ # docstring inherited
580+ super ().set_sizes (sizes , dpi = dpi )
581+ self ._sizes3d = self .get_sizes ()
582+
583+ def set_linewidth (self , lw ):
584+ # docstring inherited
585+ super ().set_linewidth (lw )
586+ self ._linewidth3d = self .get_linewidth ()
587+
526588 def do_3d_projection (self , renderer ):
527589 xs , ys , zs = self ._offsets3d
528590 vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs , renderer .M )
@@ -556,10 +618,10 @@ def do_3d_projection(self, renderer):
556618 fcs = mcolors .to_rgba_array (fcs , self ._alpha )
557619 ecs = mcolors .to_rgba_array (ecs , self ._alpha )
558620
559- self . set_edgecolors (ecs )
560- self . set_facecolors (fcs )
561- self .set_sizes (sizes )
562- self .set_linewidth (lws )
621+ super (). set_edgecolor (ecs )
622+ super (). set_facecolor (fcs )
623+ super () .set_sizes (sizes )
624+ super () .set_linewidth (lws )
563625
564626 PathCollection .set_offsets (self , vps )
565627
@@ -754,10 +816,12 @@ def do_3d_projection(self, renderer):
754816 return np .nan
755817
756818 def set_facecolor (self , colors ):
819+ # docstring inherited
757820 super ().set_facecolor (colors )
758821 self ._facecolors3d = PolyCollection .get_facecolor (self )
759822
760823 def set_edgecolor (self , colors ):
824+ # docstring inherited
761825 super ().set_edgecolor (colors )
762826 self ._edgecolors3d = PolyCollection .get_edgecolor (self )
763827
0 commit comments