@@ -124,9 +124,10 @@ def set_title(self, label, fontdict=None, loc="center", **kwargs):
124
124
125
125
Other parameters
126
126
----------------
127
- Other keyword arguments are text properties, see
128
- :class:`~matplotlib.text.Text` for a list of valid text
129
- properties.
127
+ kwargs : text properties
128
+ Other keyword arguments are text properties, see
129
+ :class:`~matplotlib.text.Text` for a list of valid text
130
+ properties.
130
131
"""
131
132
try :
132
133
title = {'left' : self ._left_title ,
@@ -2883,7 +2884,7 @@ def xywhere(xs, ys, mask):
2883
2884
2884
2885
return errorbar_container # (l0, caplines, barcols)
2885
2886
2886
- def boxplot (self , x , notch = False , sym = 'b+' , vert = True , whis = 1.5 ,
2887
+ def boxplot (self , x , notch = False , sym = None , vert = True , whis = 1.5 ,
2887
2888
positions = None , widths = None , patch_artist = False ,
2888
2889
bootstrap = None , usermedians = None , conf_intervals = None ,
2889
2890
meanline = False , showmeans = False , showcaps = True ,
@@ -2919,11 +2920,13 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
2919
2920
If False, produces a rectangular box plot.
2920
2921
If True, will produce a notched box plot
2921
2922
2922
- sym : str, default = 'b+'
2923
+ sym : str or None , default = None
2923
2924
The default symbol for flier points.
2924
2925
Enter an empty string ('') if you don't want to show fliers.
2926
+ If `None`, then the fliers default to 'b+' If you want more
2927
+ control use the fliersprop kwarg.
2925
2928
2926
- vert : bool, default = False
2929
+ vert : bool, default = True
2927
2930
If True (default), makes the boxes vertical.
2928
2931
If False, makes horizontal boxes.
2929
2932
@@ -3021,10 +3024,11 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
3021
3024
Returns
3022
3025
-------
3023
3026
3024
- A dictionary mapping each component of the boxplot
3025
- to a list of the :class:`matplotlib.lines.Line2D`
3026
- instances created. That dictionary has the following keys
3027
- (assuming vertical boxplots):
3027
+ result : dict
3028
+ A dictionary mapping each component of the boxplot
3029
+ to a list of the :class:`matplotlib.lines.Line2D`
3030
+ instances created. That dictionary has the following keys
3031
+ (assuming vertical boxplots):
3028
3032
3029
3033
- boxes: the main body of the boxplot showing the quartiles
3030
3034
and the median's confidence intervals if enabled.
@@ -3043,10 +3047,39 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
3043
3047
"""
3044
3048
bxpstats = cbook .boxplot_stats (x , whis = whis , bootstrap = bootstrap ,
3045
3049
labels = labels )
3050
+ # make sure we have a dictionary
3046
3051
if flierprops is None :
3047
- flierprops = dict (sym = sym )
3048
- else :
3049
- flierprops ['sym' ] = sym
3052
+ flierprops = dict ()
3053
+ # if non-default sym value, put it into the flier dictionary
3054
+ # the logic for providing the default symbol ('b+') now lives
3055
+ # in bxp in the initial value of final_flierprops
3056
+ # handle all of the `sym` related logic here so we only have to pass
3057
+ # on the flierprops dict.
3058
+ if sym is not None :
3059
+ # no-flier case, which should really be done with
3060
+ # 'showfliers=False' but none-the-less deal with it to keep back
3061
+ # compatibility
3062
+ if sym == '' :
3063
+ # blow away existing dict and make one for invisible markers
3064
+ flierprops = dict (linestyle = 'none' , marker = '' ,
3065
+ markeredgecolor = 'none' ,
3066
+ markerfacecolor = 'none' )
3067
+ # now process the symbol string
3068
+ else :
3069
+ # process the symbol string
3070
+ # discarded linestyle
3071
+ _ , marker , color = _process_plot_format (sym )
3072
+ # if we have a marker, use it
3073
+ if marker is not None :
3074
+ flierprops ['marker' ] = marker
3075
+ # if we have a color, use it
3076
+ if color is not None :
3077
+ flierprops ['color' ] = color
3078
+ # assume that if color is passed in the user want
3079
+ # filled symbol, if the users want more control use
3080
+ # flierprops
3081
+ flierprops ['markeredgecolor' ] = color
3082
+ flierprops ['markerfacecolor' ] = color
3050
3083
3051
3084
# replace medians if necessary:
3052
3085
if usermedians is not None :
@@ -3288,24 +3321,9 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3288
3321
final_flierprops = dict (linestyle = 'none' , marker = '+' ,
3289
3322
markeredgecolor = 'b' ,
3290
3323
markerfacecolor = 'none' )
3324
+
3291
3325
# flier (outlier) properties
3292
3326
if flierprops is not None :
3293
- sym = flierprops .pop ('sym' , None )
3294
-
3295
- # watch inverted logic, checks for non-default
3296
- # value of `sym`
3297
- if not (sym == '' or (sym is None )):
3298
- # process the symbol string
3299
- # discarded linestyle
3300
- _ , marker , color = _process_plot_format (sym )
3301
- if marker is not None :
3302
- flierprops ['marker' ] = marker
3303
- if color is not None :
3304
- flierprops ['color' ] = color
3305
- # assume that if color is passed in the user want
3306
- # filled symbol
3307
- flierprops ['markeredgecolor' ] = color
3308
- flierprops ['markerfacecolor' ] = color
3309
3327
final_flierprops .update (flierprops )
3310
3328
3311
3329
# median line properties
@@ -5032,6 +5050,7 @@ def pcolormesh(self, *args, **kwargs):
5032
5050
5033
5051
*edgecolors*: [*None* | ``'None'`` | ``'face'`` | color |
5034
5052
color sequence]
5053
+
5035
5054
If *None*, the rc setting is used by default.
5036
5055
5037
5056
If ``'None'``, edges will not be visible.
0 commit comments