@@ -1863,9 +1863,10 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
18631863 specifies the color of errorbar(s)
18641864 default: None
18651865
1866- capsize : integer , optional
1866+ capsize : scalar , optional
18671867 determines the length in points of the error bar caps
1868- default: 3
1868+ default: None, which will take the value from the
1869+ ``errorbar.capsize`` :data:`rcParam<matplotlib.rcParams>`.
18691870
18701871 error_kw : dict, optional
18711872 dictionary of kwargs to be passed to errorbar method. *ecolor* and
@@ -1931,7 +1932,7 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
19311932 yerr = kwargs .pop ('yerr' , None )
19321933 error_kw = kwargs .pop ('error_kw' , dict ())
19331934 ecolor = kwargs .pop ('ecolor' , None )
1934- capsize = kwargs .pop ('capsize' , 3 )
1935+ capsize = kwargs .pop ('capsize' , rcParams [ "errorbar.capsize" ] )
19351936 error_kw .setdefault ('ecolor' , ecolor )
19361937 error_kw .setdefault ('capsize' , capsize )
19371938
@@ -2192,8 +2193,10 @@ def barh(self, bottom, width, height=0.8, left=None, **kwargs):
21922193 ecolor : scalar or array-like, optional, default: None
21932194 specifies the color of errorbar(s)
21942195
2195- capsize : integer , optional, default: 3
2196+ capsize : scalar , optional
21962197 determines the length in points of the error bar caps
2198+ default: None, which will take the value from the
2199+ ``errorbar.capsize`` :data:`rcParam<matplotlib.rcParams>`.
21972200
21982201 error_kw :
21992202 dictionary of kwargs to be passed to errorbar method. `ecolor` and
@@ -2586,7 +2589,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
25862589
25872590 @docstring .dedent_interpd
25882591 def errorbar (self , x , y , yerr = None , xerr = None ,
2589- fmt = '' , ecolor = None , elinewidth = None , capsize = 3 ,
2592+ fmt = '' , ecolor = None , elinewidth = None , capsize = None ,
25902593 barsabove = False , lolims = False , uplims = False ,
25912594 xlolims = False , xuplims = False , errorevery = 1 , capthick = None ,
25922595 ** kwargs ):
@@ -2596,7 +2599,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
25962599 Call signature::
25972600
25982601 errorbar(x, y, yerr=None, xerr=None,
2599- fmt='', ecolor=None, elinewidth=None, capsize=3 ,
2602+ fmt='', ecolor=None, elinewidth=None, capsize=None ,
26002603 barsabove=False, lolims=False, uplims=False,
26012604 xlolims=False, xuplims=False, errorevery=1,
26022605 capthick=None)
@@ -2633,7 +2636,9 @@ def errorbar(self, x, y, yerr=None, xerr=None,
26332636 The linewidth of the errorbar lines. If *None*, use the linewidth.
26342637
26352638 *capsize*: scalar
2636- The length of the error bar caps in points
2639+ The length of the error bar caps in points; if *None*, it will
2640+ take the value from ``errorbar.capsize``
2641+ :data:`rcParam<matplotlib.rcParams>`.
26372642
26382643 *capthick*: scalar
26392644 An alias kwarg to *markeredgewidth* (a.k.a. - *mew*). This
@@ -2786,6 +2791,8 @@ def xywhere(xs, ys, mask):
27862791 return xs , ys
27872792
27882793 plot_kw = {'label' : '_nolegend_' }
2794+ if capsize is None :
2795+ capsize = rcParams ["errorbar.capsize" ]
27892796 if capsize > 0 :
27902797 plot_kw ['ms' ] = 2. * capsize
27912798 if capthick is not None :
0 commit comments