@@ -5179,14 +5179,16 @@ def pie(self, x, explode=None, labels=None, colors=None,
5179
5179
def errorbar (self , x , y , yerr = None , xerr = None ,
5180
5180
fmt = '-' , ecolor = None , elinewidth = None , capsize = 3 ,
5181
5181
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 ):
5183
5184
"""
5184
5185
Call signature::
5185
5186
5186
5187
errorbar(x, y, yerr=None, xerr=None,
5187
5188
fmt='-', ecolor=None, elinewidth=None, capsize=3,
5188
5189
barsabove=False, lolims=False, uplims=False,
5189
- xlolims=False, xuplims=False)
5190
+ xlolims=False, xuplims=False, errorevery=1,
5191
+ capthick=None)
5190
5192
5191
5193
Plot *x* versus *y* with error deltas in *yerr* and *xerr*.
5192
5194
Vertical errorbars are plotted if *yerr* is not *None*.
@@ -5210,14 +5212,22 @@ def errorbar(self, x, y, yerr=None, xerr=None,
5210
5212
errorbars to a bar plot, for example.
5211
5213
5212
5214
*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;
5214
5216
if *None*, use the marker color.
5215
5217
5216
5218
*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.
5218
5220
5219
5221
*capsize*: scalar
5220
- the size of the error bar caps in points
5222
+ The length 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.
5221
5231
5222
5232
*barsabove*: [ *True* | *False* ]
5223
5233
if *True*, will plot the errorbars above the plot
@@ -5268,7 +5278,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
5268
5278
"""
5269
5279
5270
5280
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' )
5272
5282
5273
5283
self ._process_unit_info (xdata = x , ydata = y , kwargs = kwargs )
5274
5284
if not self ._hold : self .cla ()
@@ -5344,6 +5354,15 @@ def xywhere(xs, ys, mask):
5344
5354
plot_kw = {
5345
5355
'ms' :2 * capsize ,
5346
5356
'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.
5347
5366
if 'markeredgewidth' in kwargs :
5348
5367
plot_kw ['markeredgewidth' ]= kwargs ['markeredgewidth' ]
5349
5368
if 'mew' in kwargs :
0 commit comments