@@ -5179,14 +5179,16 @@ def pie(self, x, explode=None, labels=None, colors=None,
51795179 def errorbar (self , x , y , yerr = None , xerr = None ,
51805180 fmt = '-' , ecolor = None , elinewidth = None , capsize = 3 ,
51815181 barsabove = False , lolims = False , uplims = False ,
5182- xlolims = False , xuplims = False , errorevery = 1 , ** kwargs ):
5182+ xlolims = False , xuplims = False , errorevery = 1 , capthick = None ,
5183+ ** kwargs ):
51835184 """
51845185 Call signature::
51855186
51865187 errorbar(x, y, yerr=None, xerr=None,
51875188 fmt='-', ecolor=None, elinewidth=None, capsize=3,
51885189 barsabove=False, lolims=False, uplims=False,
5189- xlolims=False, xuplims=False)
5190+ xlolims=False, xuplims=False, errorevery=1,
5191+ capthick=None)
51905192
51915193 Plot *x* versus *y* with error deltas in *yerr* and *xerr*.
51925194 Vertical errorbars are plotted if *yerr* is not *None*.
@@ -5210,14 +5212,22 @@ def errorbar(self, x, y, yerr=None, xerr=None,
52105212 errorbars to a bar plot, for example.
52115213
52125214 *ecolor*: [ *None* | mpl color ]
5213- a matplotlib color arg which gives the color the errorbar lines;
5215+ A matplotlib color arg which gives the color the errorbar lines;
52145216 if *None*, use the marker color.
52155217
52165218 *elinewidth*: scalar
5217- the linewidth of the errorbar lines. If *None*, use the linewidth.
5219+ The linewidth of the errorbar lines. If *None*, use the linewidth.
52185220
52195221 *capsize*: scalar
5220- the size of the error bar caps in points
5222+ The size of the error bar caps in points
5223+
5224+ *capthick*: scalar
5225+ An alias kwarg to *markeredgewidth* (a.k.a. - *mew*). This
5226+ setting is a more sensible name for the property that
5227+ controls the thickness of the error bar cap in points. For
5228+ backwards compatibility, if *mew* or *markeredgewidth* are given,
5229+ then they will over-ride *capthick*. This may change in future
5230+ releases.
52215231
52225232 *barsabove*: [ *True* | *False* ]
52235233 if *True*, will plot the errorbars above the plot
@@ -5268,7 +5278,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
52685278 """
52695279
52705280 if errorevery < 1 :
5271- raise ValueError ('errorevery has to be a strictly positive integer ' )
5281+ raise ValueError ('errorevery has to be a strictly positive integer' )
52725282
52735283 self ._process_unit_info (xdata = x , ydata = y , kwargs = kwargs )
52745284 if not self ._hold : self .cla ()
@@ -5344,6 +5354,15 @@ def xywhere(xs, ys, mask):
53445354 plot_kw = {
53455355 'ms' :2 * capsize ,
53465356 'label' :'_nolegend_' }
5357+ if capthick is not None :
5358+ # 'mew' has higher priority, I believe,
5359+ # if both 'mew' and 'markeredgewidth' exists.
5360+ # So, save capthick to markeredgewidth so that
5361+ # explicitly setting mew or markeredgewidth will
5362+ # over-write capthick.
5363+ plot_kw ['markeredgewidth' ] = capthick
5364+ # For backwards-compat, allow explicit setting of
5365+ # 'mew' or 'markeredgewidth' to over-ride capthick.
53475366 if 'markeredgewidth' in kwargs :
53485367 plot_kw ['markeredgewidth' ]= kwargs ['markeredgewidth' ]
53495368 if 'mew' in kwargs :
0 commit comments