@@ -435,6 +435,32 @@ def __init__(self, *args, zs=0, zdir='z', depthshade=True, **kwargs):
435
435
super ().__init__ (* args , ** kwargs )
436
436
self .set_3d_properties (zs , zdir )
437
437
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
+
438
464
def set_sort_zpos (self , val ):
439
465
"""Set the position to use for z-sorting."""
440
466
self ._sort_zpos = val
@@ -462,13 +488,13 @@ def do_3d_projection(self, renderer):
462
488
fcs = (_zalpha (self ._facecolor3d , vzs ) if self ._depthshade else
463
489
self ._facecolor3d )
464
490
fcs = mcolors .to_rgba_array (fcs , self ._alpha )
465
- self . set_facecolors (fcs )
491
+ super (). set_facecolor (fcs )
466
492
467
493
ecs = (_zalpha (self ._edgecolor3d , vzs ) if self ._depthshade else
468
494
self ._edgecolor3d )
469
495
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 ]))
472
498
473
499
if vzs .size > 0 :
474
500
return min (vzs )
@@ -523,6 +549,42 @@ def set_3d_properties(self, zs, zdir):
523
549
self ._linewidth3d = self .get_linewidth ()
524
550
self .stale = True
525
551
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
+ """
<
57AE
/code>
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
+
526
588
def do_3d_projection (self , renderer ):
527
589
xs , ys , zs = self ._offsets3d
528
590
vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs , renderer .M )
@@ -556,10 +618,10 @@ def do_3d_projection(self, renderer):
556
618
fcs = mcolors .to_rgba_array (fcs , self ._alpha )
557
619
ecs = mcolors .to_rgba_array (ecs , self ._alpha )
558
620
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 )
563
625
564
626
PathCollection .set_offsets (self , vps )
565
627
@@ -754,10 +816,12 @@ def do_3d_projection(self, renderer):
754
816
return np .nan
755
817
756
818
def set_facecolor (self , colors ):
819
+ # docstring inherited
757
820
super ().set_facecolor (colors )
758
821
self ._facecolors3d = PolyCollection .get_facecolor (self )
759
822
760
823
def set_edgecolor (self , colors ):
824
+ # docstring inherited
761
825
super ().set_edgecolor (colors )
762
826
self ._edgecolors3d = PolyCollection .get_edgecolor (self )
763
827
0 commit comments