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