@@ -3551,6 +3551,8 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3551
3551
'dotted' : ':'
3552
3552
}
3553
3553
3554
+ zorder = mlines .Line2D .zorder
3555
+ zdelta = 0.1
3554
3556
# box properties
3555
3557
if patch_artist :
3556
3558
final_boxprops = dict (
@@ -3567,6 +3569,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3567
3569
color = rcParams ['boxplot.boxprops.color' ],
3568
3570
)
3569
3571
3572
+ final_boxprops ['zorder' ] = zorder
3570
3573
if boxprops is not None :
3571
3574
final_boxprops .update (boxprops )
3572
3575
@@ -3583,9 +3586,11 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3583
3586
color = rcParams ['boxplot.capprops.color' ],
3584
3587
)
3585
3588
3589
+ final_capprops ['zorder' ] = zorder
3586
3590
if capprops is not None :
3587
3591
final_capprops .update (capprops )
3588
3592
3593
+ final_whiskerprops ['zorder' ] = zorder
3589
3594
if whiskerprops is not None :
3590
3595
final_whiskerprops .update (whiskerprops )
3591
3596
@@ -3600,6 +3605,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3600
3605
markersize = rcParams ['boxplot.flierprops.markersize' ],
3601
3606
)
3602
3607
3608
+ final_flierprops ['zorder' ] = zorder
3603
3609
# flier (outlier) properties
3604
3610
if flierprops is not None :
3605
3611
final_flierprops .update (flierprops )
@@ -3610,6 +3616,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3610
3616
linewidth = rcParams ['boxplot.medianprops.linewidth' ],
3611
3617
color = rcParams ['boxplot.medianprops.color' ],
3612
3618
)
3619
+ final_medianprops ['zorder' ] = zorder + zdelta
3613
3620
if medianprops is not None :
3614
3621
final_medianprops .update (medianprops )
3615
3622
@@ -3628,13 +3635,14 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3628
3635
markeredgecolor = rcParams ['boxplot.meanprops.markeredgecolor' ],
3629
3636
markersize = rcParams ['boxplot.meanprops.markersize' ],
3630
3637
)
3638
+ final_meanprops ['zorder' ] = zorder + zdelta
3631
3639
if meanprops is not None :
3632
3640
final_meanprops .update (meanprops )
3633
3641
3634
3642
def to_vc (xs , ys ):
3635
3643
# convert arguments to verts and codes
3636
3644
verts = []
3637
- #codes = []
3645
+
3638
3646
for xi , yi in zip (xs , ys ):
3639
3647
verts .append ((xi , yi ))
3640
3648
verts .append ((0 , 0 )) # ignored
0 commit comments