@@ -3110,7 +3110,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31103110 showbox = None , showfliers = None , boxprops = None ,
31113111 labels = None , flierprops = None , medianprops = None ,
31123112 meanprops = None , capprops = None , whiskerprops = None ,
3113- manage_xticks = True , autorange = False ):
3113+ manage_xticks = True , autorange = False , zorder = None ):
31143114 """
31153115 Make a box and whisker plot.
31163116
@@ -3123,7 +3123,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31233123 showbox=True, showfliers=True, boxprops=None,
31243124 labels=None, flierprops=None, medianprops=None,
31253125 meanprops=None, capprops=None, whiskerprops=None,
3126- manage_xticks=True, autorange=False):
3126+ manage_xticks=True, autorange=False, zorder=None ):
31273127
31283128 Make a box and whisker plot for each column of ``x`` or each
31293129 vector in sequence ``x``. The box extends from the lower to
@@ -3235,6 +3235,9 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
32353235 ``shownotches`` is also True. Otherwise, means will be shown
32363236 as points.
32373237
3238+ zorder : scalar, optional (None)
3239+ Sets the zorder of the boxplot.
3240+
32383241 Other Parameters
32393242 ----------------
32403243 showcaps : bool, optional (True)
@@ -3409,15 +3412,15 @@ def _update_dict(dictionary, rc_name, properties):
34093412 medianprops = medianprops , meanprops = meanprops ,
34103413 meanline = meanline , showfliers = showfliers ,
34113414 capprops = capprops , whiskerprops = whiskerprops ,
3412- manage_xticks = manage_xticks )
3415+ manage_xticks = manage_xticks , zorder = zorder )
34133416 return artists
34143417
34153418 def bxp (self , bxpstats , positions = None , widths = None , vert = True ,
34163419 patch_artist = False , shownotches = False , showmeans = False ,
34173420 showcaps = True , showbox = True , showfliers = True ,
34183421 boxprops = None , whiskerprops = None , flierprops = None ,
34193422 medianprops = None , capprops = None , meanprops = None ,
3420- meanline = False , manage_xticks = True ):
3423+ meanline = False , manage_xticks = True , zorder = None ):
34213424 """
34223425 Drawing function for box and whisker plots.
34233426
@@ -3428,7 +3431,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
34283431 showcaps=True, showbox=True, showfliers=True,
34293432 boxprops=None, whiskerprops=None, flierprops=None,
34303433 medianprops=None, capprops=None, meanprops=None,
3431- meanline=False, manage_xticks=True):
3434+ meanline=False, manage_xticks=True, zorder=None ):
34323435
34333436 Make a box and whisker plot for each column of *x* or each
34343437 vector in sequence *x*. The box extends from the lower to
@@ -3532,6 +3535,9 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
35323535 manage_xticks : bool, default = True
35333536 If the function should adjust the xlim and xtick locations.
35343537
3538+ zorder : scalar, default = None
3539+ The zorder of the resulting boxplot
3540+
35353541 Returns
35363542 -------
35373543 result : dict
@@ -3574,7 +3580,10 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
35743580 # empty list of xticklabels
35753581 datalabels = []
35763582
3577- zorder = mlines .Line2D .zorder
3583+ # Use default zorder if none specified
3584+ if zorder is None :
3585+ zorder = mlines .Line2D .zorder
3586+
35783587 zdelta = 0.1
35793588 # box properties
35803589 if patch_artist :
0 commit comments