@@ -3367,16 +3367,17 @@ def errorbar(self, x, y, yerr=None, xerr=None,
3367
3367
if ecolor is None :
3368
3368
ecolor = base_style ['color' ]
3369
3369
3370
- # Make the style dict for the line collections (the bars), ejecting any
3371
- # marker information from format string.
3372
- eb_lines_style = dict (base_style )
3373
- eb_lines_style .pop ('marker' , None )
3374
- eb_lines_style .pop ('markersize' , None )
3375
- eb_lines_style .pop ('markerfacecolor' , None )
3376
- eb_lines_style .pop ('markeredgewidth' , None )
3377
- eb_lines_style .pop ('markeredgecolor' , None )
3378
- eb_lines_style .pop ('linestyle' , None )
3379
- eb_lines_style ['color' ] = ecolor
3370
+ # Eject any marker information from line format string, as it's not
3371
+ # needed for bars or caps.
3372
+ base_style .pop ('marker' , None )
3373
+ base_style .pop ('markersize' , None )
3374
+ base_style .pop ('markerfacecolor' , None )
3375
+ base_style .pop ('markeredgewidth' , None )
3376
+ base_style .pop ('markeredgecolor' , None )
3377
+ base_style .pop ('linestyle' , None )
3378
+
3379
+ # Make the style dict for the line collections (the bars).
3380
+ eb_lines_style = {** base_style , 'color' : ecolor }
3380
3381
3381
3382
if elinewidth :
3382
3383
eb_lines_style ['linewidth' ] = elinewidth
@@ -3387,15 +3388,8 @@ def errorbar(self, x, y, yerr=None, xerr=None,
3387
3388
if key in kwargs :
3388
3389
eb_lines_style [key ] = kwargs [key ]
3389
3390
3390
- # Make the style dict for the caps, ejecting any marker information
3391
- # from format string.
3392
- eb_cap_style = dict (base_style )
3393
- eb_cap_style .pop ('marker' , None )
3394
- eb_cap_style .pop ('markersize' , None )
3395
- eb_cap_style .pop ('markerfacecolor' , None )
3396
- eb_cap_style .pop ('markeredgewidth' , None )
3397
- eb_cap_style .pop ('markeredgecolor' , None )
3398
- eb_cap_style ['linestyle' ] = 'none'
3391
+ # Make the style dict for the caps.
3392
+ eb_cap_style = {** base_style , 'linestyle' : 'none' }
3399
3393
if capsize is None :
3400
3394
capsize = rcParams ["errorbar.capsize" ]
3401
3395
if capsize > 0 :
0 commit comments