@@ -2854,7 +2854,8 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
2854
2854
bootstrap = None , usermedians = None , conf_intervals = None ,
2855
2855
meanline = False , showmeans = False , showcaps = True ,
2856
2856
showbox = True , showfliers = True , boxprops = None , labels = None ,
2857
- flierprops = None , medianprops = None , meanprops = None ):
2857
+ flierprops = None , medianprops = None , meanprops = None ,
2858
+ manage_xticks = True ):
2858
2859
"""
2859
2860
Make a box and whisker plot.
2860
2861
@@ -3039,14 +3040,15 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
3039
3040
showcaps = showcaps , showbox = showbox ,
3040
3041
boxprops = boxprops , flierprops = flierprops ,
3041
3042
medianprops = medianprops , meanprops = meanprops ,
3042
- meanline = meanline , showfliers = showfliers )
3043
+ meanline = meanline , showfliers = showfliers ,
3044
+ manage_xticks = manage_xticks )
3043
3045
return artists
3044
3046
3045
3047
def bxp (self , bxpstats , positions = None , widths = None , vert = True ,
3046
3048
patch_artist = False , shownotches = False , showmeans = False ,
3047
3049
showcaps = True , showbox = True , showfliers = True ,
3048
3050
boxprops = None , flierprops = None , medianprops = None ,
3049
- meanprops = None , meanline = False ):
3051
+ meanprops = None , meanline = False , manage_xticks = True ):
3050
3052
"""
3051
3053
Drawing function for box and whisker plots.
3052
3054
@@ -3056,7 +3058,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3056
3058
patch_artist=False, shownotches=False, showmeans=False,
3057
3059
showcaps=True, showbox=True, showfliers=True,
3058
3060
boxprops=None, flierprops=None, medianprops=None,
3059
- meanprops=None, meanline=False)
3061
+ meanprops=None, meanline=False, manage_xticks=True )
3060
3062
3061
3063
Make a box and whisker plot for each column of *x* or each
3062
3064
vector in sequence *x*. The box extends from the lower to
@@ -3135,6 +3137,9 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3135
3137
*meanprops*. Not recommended if *shownotches* is also True.
3136
3138
Otherwise, means will be shown as points.
3137
3139
3140
+ manage_xticks : bool, default = True
3141
+ If the function should adjust the xlim and xtick locations.
3142
+
3138
3143
Returns
3139
3144
-------
3140
3145
@@ -3369,10 +3374,11 @@ def dopatch(xs, ys, **kwargs):
3369
3374
setlim = self .set_ylim
3370
3375
setlabels = self .set_yticklabels
3371
3376
3372
- newlimits = min (positions ) - 0.5 , max (positions ) + 0.5
3373
- setlim (newlimits )
3374
- setticks (positions )
3375
- setlabels (datalabels )
3377
+ if manage_xticks :
3378
+ newlimits = min (positions ) - 0.5 , max (positions ) + 0.5
3379
+ setlim (newlimits )
3380
+ setticks (positions )
3381
+ setlabels (datalabels )
3376
3382
3377
3383
# reset hold status
3378
3384
self .hold (holdStatus )
0 commit comments