39
39
import matplotlib .transforms as mtrans
40
40
from matplotlib .container import BarContainer , ErrorbarContainer , StemContainer
41
41
from matplotlib .axes ._base import _AxesBase
42
+ from matplotlib .axes ._base import _process_plot_format
42
43
43
44
iterable = cbook .iterable
44
45
is_string_like = cbook .is_string_like
@@ -3254,21 +3255,23 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3254
3255
if whiskerprops is not None :
3255
3256
final_whiskerprops .update (whiskerprops )
3256
3257
3258
+ # set up the default flier properties
3259
+ final_flierprops = dict (linestyle = 'none' , marker = '+' ,
3260
+ markeredgecolor = 'b' ,
3261
+ markerfacecolor = 'none' )
3257
3262
# flier (outlier) properties
3258
3263
if flierprops is not None :
3259
- sym = flierprops .pop ('sym' , '' )
3260
-
3261
- if sym == '' :
3262
- final_flierprops = dict (linestyle = 'none' , marker = '+' ,
3263
- markeredgecolor = 'b' ,
3264
- markerfacecolor = 'none' )
3265
- else :
3266
- final_flierprops = dict (linestyle = 'none' )
3264
+ sym = flierprops .pop ('sym' , None )
3265
+
3266
+ # watch inverted logic, checks for non-default
3267
+ # value of `sym`
3268
+ if not (sym == '' or (sym is None )):
3269
+ # process the symbol string
3270
+ # discarded linestyle
3271
+ _ , marker , color = _process_plot_format (sym )
3272
+ final_flierprops ['marker' ] = marker
3273
+ final_flierprops ['color' ] = color
3267
3274
final_flierprops .update (flierprops )
3268
- else :
3269
- sym = ''
3270
- final_flierprops = dict (linestyle = 'none' , marker = '+' ,
3271
- markeredgecolor = 'b' )
3272
3275
3273
3276
# median line properties
3274
3277
final_medianprops = dict (linestyle = '-' , color = 'red' )
@@ -3398,10 +3401,10 @@ def dopatch(xs, ys, **kwargs):
3398
3401
3399
3402
# draw the whiskers
3400
3403
whiskers .extend (doplot (
3401
- whisker_x , whiskerlo_y ,** final_whiskerprops
3404
+ whisker_x , whiskerlo_y , ** final_whiskerprops
3402
3405
))
3403
3406
whiskers .extend (doplot (
3404
- whisker_x , whiskerhi_y ,** final_whiskerprops
3407
+ whisker_x , whiskerhi_y , ** final_whiskerprops
3405
3408
))
3406
3409
3407
3410
# maybe draw the caps:
@@ -3427,7 +3430,7 @@ def dopatch(xs, ys, **kwargs):
3427
3430
# maybe draw the fliers
3428
3431
if showfliers :
3429
3432
fliers .extend (doplot (
3430
- flier_x , flier_y , sym , ** final_flierprops
3433
+ flier_x , flier_y , ** final_flierprops
3431
3434
))
3432
3435
3433
3436
# fix our axes/ticks up a little
0 commit comments