@@ -2682,16 +2682,12 @@ def errorbar(self, x, y, yerr=None, xerr=None,
2682
2682
if elinewidth :
2683
2683
lines_kw ['linewidth' ] = elinewidth
2684
2684
else :
2685
- if 'linewidth' in kwargs :
2686
- lines_kw ['linewidth' ] = kwargs ['linewidth' ]
2687
- if 'lw' in kwargs :
2688
- lines_kw ['lw' ] = kwargs ['lw' ]
2689
- if 'transform' in kwargs :
2690
- lines_kw ['transform' ] = kwargs ['transform' ]
2691
- if 'alpha' in kwargs :
2692
- lines_kw ['alpha' ] = kwargs ['alpha' ]
2693
- if 'zorder' in kwargs :
2694
- lines_kw ['zorder' ] = kwargs ['zorder' ]
2685
+ for key in ('linewidth' , 'lw' ):
2686
+ if key in kwargs :
2687
+ lines_kw [key ] = kwargs [key ]
2688
+ for key in ('transform' , 'alpha' , 'zorder' ):
2689
+ if key in kwargs :
2690
+ lines_kw [key ] = kwargs [key ]
2695
2691
2696
2692
# arrays fine here, they are booleans and hence not units
2697
2693
if not iterable (lolims ):
@@ -2739,16 +2735,9 @@ def xywhere(xs, ys, mask):
2739
2735
plot_kw ['markeredgewidth' ] = capthick
2740
2736
# For backwards-compat, allow explicit setting of
2741
2737
# 'mew' or 'markeredgewidth' to over-ride capthick.
2742
- if 'markeredgewidth' in kwargs :
2743
- plot_kw ['markeredgewidth' ] = kwargs ['markeredgewidth' ]
2744
- if 'mew' in kwargs :
2745
- plot_kw ['mew' ] = kwargs ['mew' ]
2746
- if 'transform' in kwargs :
2747
- plot_kw ['transform' ] = kwargs ['transform' ]
2748
- if 'alpha' in kwargs :
2749
- plot_kw ['alpha' ] = kwargs ['alpha' ]
2750
- if 'zorder' in kwargs :
2751
- plot_kw ['zorder' ] = kwargs ['zorder' ]
2738
+ for key in ('markeredgewidth' , 'mew' , 'transform' , 'alpha' , 'zorder' ):
2739
+ if key in kwargs :
2740
+ plot_kw [key ] = kwargs [key ]
2752
2741
2753
2742
if xerr is not None :
2754
2743
if (iterable (xerr ) and len (xerr ) == 2 and
0 commit comments