Skip to content

Commit

Permalink
Merge pull request #1675 from megies/errorbar_alpha
Browse files Browse the repository at this point in the history
fix "alpha" kwarg in errorbar plot
  • Loading branch information
dmcdougall committed Jan 18, 2013
2 parents 5a88d93 + a70108f commit dc37c49
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 77 deletions.
4 changes: 4 additions & 0 deletions lib/matplotlib/axes.py
Expand Up @@ -5441,6 +5441,8 @@ def errorbar(self, x, y, yerr=None, xerr=None,
lines_kw['lw']=kwargs['lw']
if 'transform' in kwargs:
lines_kw['transform'] = kwargs['transform']
if 'alpha' in kwargs:
lines_kw['alpha'] = kwargs['alpha']
if 'zorder' in kwargs:
lines_kw['zorder'] = kwargs['zorder']

Expand Down Expand Up @@ -5491,6 +5493,8 @@ def xywhere(xs, ys, mask):
plot_kw['mew']=kwargs['mew']
if 'transform' in kwargs:
plot_kw['transform'] = kwargs['transform']
if 'alpha' in kwargs:
plot_kw['alpha'] = kwargs['alpha']
if 'zorder' in kwargs:
plot_kw['zorder'] = kwargs['zorder']

Expand Down
Binary file not shown.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
243 changes: 168 additions & 75 deletions lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_axes.py
Expand Up @@ -900,8 +900,8 @@ def test_errorbar():
ax.locator_params(nbins=4)

ax = axs[0,1]
ax.errorbar(x, y, xerr=xerr, fmt='o')
ax.set_title('Hor. symmetric')
ax.errorbar(x, y, xerr=xerr, fmt='o', alpha=0.4)
ax.set_title('Hor. symmetric w/ alpha')

ax = axs[1,0]
ax.errorbar(x, y, yerr=[yerr, 2*yerr], xerr=[xerr, 2*xerr], fmt='--o')
Expand Down

0 comments on commit dc37c49

Please sign in to comment.