@@ -1862,7 +1862,8 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
18621862
18631863 capsize : integer, optional
18641864 determines the length in points of the error bar caps
1865- default: 3
1865+ default: None, which will take the value from the
1866+ ``errorbar.capsize`` :data:`rcParam<matplotlib.rcParams>`.
18661867
18671868 error_kw : dict, optional
18681869 dictionary of kwargs to be passed to errorbar method. *ecolor* and
@@ -1928,7 +1929,7 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
19281929 yerr = kwargs .pop ('yerr' , None )
19291930 error_kw = kwargs .pop ('error_kw' , dict ())
19301931 ecolor = kwargs .pop ('ecolor' , None )
1931- capsize = kwargs .pop ('capsize' , 3 )
1932+ capsize = kwargs .pop ('capsize' , rcParams [ "errorbar.capsize" ] )
19321933 error_kw .setdefault ('ecolor' , ecolor )
19331934 error_kw .setdefault ('capsize' , capsize )
19341935
@@ -2189,8 +2190,10 @@ def barh(self, bottom, width, height=0.8, left=None, **kwargs):
21892190 ecolor : scalar or array-like, optional, default: None
21902191 specifies the color of errorbar(s)
21912192
2192- capsize : integer, optional, default: 3
2193+ capsize : integer, optional
21932194 determines the length in points of the error bar caps
2195+ default: None, which will take the value from the
2196+ ``errorbar.capsize`` :data:`rcParam<matplotlib.rcParams>`.
21942197
21952198 error_kw :
21962199 dictionary of kwargs to be passed to errorbar method. `ecolor` and
@@ -2583,7 +2586,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
25832586
25842587 @docstring .dedent_interpd
25852588 def errorbar (self , x , y , yerr = None , xerr = None ,
2586- fmt = '' , ecolor = None , elinewidth = None , capsize = 3 ,
2589+ fmt = '' , ecolor = None , elinewidth = None , capsize = None ,
25872590 barsabove = False , lolims = False , uplims = False ,
25882591 xlolims = False , xuplims = False , errorevery = 1 , capthick = None ,
25892592 ** kwargs ):
@@ -2630,7 +2633,8 @@ def errorbar(self, x, y, yerr=None, xerr=None,
26302633 The linewidth of the errorbar lines. If *None*, use the linewidth.
26312634
26322635 *capsize*: scalar
2633- The length of the error bar caps in points
2636+ The length of the error bar caps in points; if *None*, it will
2637+ take the value from ``errorbar.capsize`` :data:`rcParam<matplotlib.rcParams>`.
26342638
26352639 *capthick*: scalar
26362640 An alias kwarg to *markeredgewidth* (a.k.a. - *mew*). This
@@ -2783,6 +2787,8 @@ def xywhere(xs, ys, mask):
27832787 return xs , ys
27842788
27852789 plot_kw = {'label' : '_nolegend_' }
2790+ if capsize is None :
2791+ capsize = rcParams ["errorbar.capsize" ]
27862792 if capsize > 0 :
27872793 plot_kw ['ms' ] = 2. * capsize
27882794 if capthick is not None :
0 commit comments