@@ -2854,7 +2854,7 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
28542854 bootstrap = None , usermedians = None , conf_intervals = None ,
28552855 meanline = False , showmeans = False , showcaps = True ,
28562856 showbox = True , showfliers = True , boxprops = None , labels = None ,
2857- flierprops = None , medianprops = None , meanprops = None ):
2857+ flierprops = None , medianprops = None , meanprops = None , manage_xticks = True ):
28582858 """
28592859 Make a box and whisker plot.
28602860
@@ -3039,14 +3039,15 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
30393039 showcaps = showcaps , showbox = showbox ,
30403040 boxprops = boxprops , flierprops = flierprops ,
30413041 medianprops = medianprops , meanprops = meanprops ,
3042- meanline = meanline , showfliers = showfliers )
3042+ meanline = meanline , showfliers = showfliers ,
3043+ manage_xticks = manage_xticks )
30433044 return artists
30443045
30453046 def bxp (self , bxpstats , positions = None , widths = None , vert = True ,
30463047 patch_artist = False , shownotches = False , showmeans = False ,
30473048 showcaps = True , showbox = True , showfliers = True ,
30483049 boxprops = None , flierprops = None , medianprops = None ,
3049- meanprops = None , meanline = False ):
3050+ meanprops = None , meanline = False , manage_xticks = True ):
30503051 """
30513052 Drawing function for box and whisker plots.
30523053
@@ -3056,7 +3057,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
30563057 patch_artist=False, shownotches=False, showmeans=False,
30573058 showcaps=True, showbox=True, showfliers=True,
30583059 boxprops=None, flierprops=None, medianprops=None,
3059- meanprops=None, meanline=False)
3060+ meanprops=None, meanline=False, manage_xticks=True )
30603061
30613062 Make a box and whisker plot for each column of *x* or each
30623063 vector in sequence *x*. The box extends from the lower to
@@ -3135,6 +3136,9 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
31353136 *meanprops*. Not recommended if *shownotches* is also True.
31363137 Otherwise, means will be shown as points.
31373138
3139+ manage_xticks : bool, default = True
3140+ If the function should adjust the xlim and xtick locations.
3141+
31383142 Returns
31393143 -------
31403144
@@ -3369,10 +3373,11 @@ def dopatch(xs, ys, **kwargs):
33693373 setlim = self .set_ylim
33703374 setlabels = self .set_yticklabels
33713375
3372- newlimits = min (positions ) - 0.5 , max (positions ) + 0.5
3373- setlim (newlimits )
3374- setticks (positions )
3375- setlabels (datalabels )
3376+ if manage_xticks :
3377+ newlimits = min (positions ) - 0.5 , max (positions ) + 0.5
3378+ setlim (newlimits )
3379+ setticks (positions )
3380+ setlabels (datalabels )
33763381
33773382 # reset hold status
33783383 self .hold (holdStatus )
0 commit comments