@@ -3537,6 +3537,8 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3537
3537
'dotted' : ':'
3538
3538
}
3539
3539
3540
+ zorder = mlines .Line2D .zorder
3541
+ zdelta = 0.1
3540
3542
# box properties
3541
3543
if patch_artist :
3542
3544
final_boxprops = dict (
@@ -3553,6 +3555,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3553
3555
color = rcParams ['boxplot.boxprops.color' ],
3554
3556
)
3555
3557
3558
+ final_boxprops ['zorder' ] = zorder
3556
3559
if boxprops is not None :
3557
3560
final_boxprops .update (boxprops )
3558
3561
@@ -3569,9 +3572,11 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3569
3572
color = rcParams ['boxplot.capprops.color' ],
3570
3573
)
3571
3574
3575
+ final_capprops ['zorder' ] = zorder
3572
3576
if capprops is not None :
3573
3577
final_capprops .update (capprops )
3574
3578
3579
+ final_whiskerprops ['zorder' ] = zorder
3575
3580
if whiskerprops is not None :
3576
3581
final_whiskerprops .update (whiskerprops )
3577
3582
@@ -3586,6 +3591,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3586
3591
markersize = rcParams ['boxplot.flierprops.markersize' ],
3587
3592
)
3588
3593
3594
+ final_flierprops ['zorder' ] = zorder
3589
3595
# flier (outlier) properties
3590
3596
if flierprops is not None :
3591
3597
final_flierprops .update (flierprops )
@@ -3596,6 +3602,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3596
3602
linewidth = rcParams ['boxplot.medianprops.linewidth' ],
3597
3603
color = rcParams ['boxplot.medianprops.color' ],
3598
3604
)
3605
+ final_medianprops ['zorder' ] = zorder + zdelta
3599
3606
if medianprops is not None :
3600
3607
final_medianprops .update (medianprops )
3601
3608
@@ -3614,13 +3621,14 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3614
3621
markeredgecolor = rcParams ['boxplot.meanprops.markeredgecolor' ],
3615
3622
markersize = rcParams ['boxplot.meanprops.markersize' ],
3616
3623
)
3624
+ final_meanprops ['zorder' ] = zorder + zdelta
3617
3625
if meanprops is not None :
3618
3626
final_meanprops .update (meanprops )
3619
3627
3620
3628
def to_vc (xs , ys ):
3621
3629
# convert arguments to verts and codes
3622
3630
verts = []
3623
- #codes = []
3631
+
3624
3632
for xi , yi in zip (xs , ys ):
3625
3633
verts .append ((xi , yi ))
3626
3634
verts .append ((0 , 0 )) # ignored
0 commit comments