@@ -1863,9 +1863,10 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
1863
1863
specifies the color of errorbar(s)
1864
1864
default: None
1865
1865
1866
- capsize : integer , optional
1866
+ capsize : scalar , optional
1867
1867
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>`.
1869
1870
1870
1871
error_kw : dict, optional
1871
1872
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):
1931
1932
yerr = kwargs .pop ('yerr' , None )
1932
1933
error_kw = kwargs .pop ('error_kw' , dict ())
1933
1934
ecolor = kwargs .pop ('ecolor' , None )
1934
- capsize = kwargs .pop ('capsize' , 3 )
1935
+ capsize = kwargs .pop ('capsize' , rcParams [ "errorbar.capsize" ] )
1935
1936
error_kw .setdefault ('ecolor' , ecolor )
1936
1937
error_kw .setdefault ('capsize' , capsize )
1937
1938
@@ -2192,8 +2193,10 @@ def barh(self, bottom, width, height=0.8, left=None, **kwargs):
2192
2193
ecolor : scalar or array-like, optional, default: None
2193
2194
specifies the color of errorbar(s)
2194
2195
2195
- capsize : integer , optional, default: 3
2196
+ capsize : scalar , optional
2196
2197
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>`.
2197
2200
2198
2201
error_kw :
2199
2202
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,
2586
2589
2587
2590
@docstring .dedent_interpd
2588
2591
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 ,
2590
2593
barsabove = False , lolims = False , uplims = False ,
2591
2594
xlolims = False , xuplims = False , errorevery = 1 , capthick = None ,
2592
2595
** kwargs ):
@@ -2596,7 +2599,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
2596
2599
Call signature::
2597
2600
2598
2601
errorbar(x, y, yerr=None, xerr=None,
2599
- fmt='', ecolor=None, elinewidth=None, capsize=3 ,
2602
+ fmt='', ecolor=None, elinewidth=None, capsize=None ,
2600
2603
barsabove=False, lolims=False, uplims=False,
2601
2604
xlolims=False, xuplims=False, errorevery=1,
2602
2605
capthick=None)
@@ -2633,7 +2636,9 @@ def errorbar(self, x, y, yerr=None, xerr=None,
2633
2636
The linewidth of the errorbar lines. If *None*, use the linewidth.
2634
2637
2635
2638
*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>`.
2637
2642
2638
2643
*capthick*: scalar
2639
2644
An alias kwarg to *markeredgewidth* (a.k.a. - *mew*). This
@@ -2786,6 +2791,8 @@ def xywhere(xs, ys, mask):
2786
2791
return xs , ys
2787
2792
2788
2793
plot_kw = {'label' : '_nolegend_' }
2794
+ if capsize is None :
2795
+ capsize = rcParams ["errorbar.capsize" ]
2789
2796
if capsize > 0 :
2790
2797
plot_kw ['ms' ] = 2. * capsize
2791
2798
if capthick is not None :
0 commit comments