Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e25c66

Browse files
authored
Merge pull request #19784 from smartlixx/FIX_v3.4.0_errorbar_fillstyle
FIX errorbar problem with fillstyle
2 parents e6fd901 + 4b6f658 commit 2e25c66

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3372,6 +3372,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
33723372
base_style.pop('markeredgecolor', None)
33733373
base_style.pop('markevery', None)
33743374
base_style.pop('linestyle', None)
3375+
base_style.pop('fillstyle', None)
33753376

33763377
# Make the style dict for the line collections (the bars).
33773378
eb_lines_style = {**base_style, 'color': ecolor}

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,6 +3437,16 @@ def test_errobar_nonefmt():
34373437
assert np.all(errbar.get_color() == mcolors.to_rgba('C0'))
34383438

34393439

3440+
def test_errorbar_fillstyle():
3441+
# Check that passing 'fillstyle' keyword will not result in errors
3442+
x = np.arange(5)
3443+
y = np.arange(5)
3444+
3445+
plotline, _, _ = plt.errorbar(x, y, xerr=1, yerr=1, ls='None',
3446+
marker='s', fillstyle='full')
3447+
assert plotline.get_fillstyle() == 'full'
3448+
3449+
34403450
@check_figures_equal(extensions=['png'])
34413451
def test_errorbar_with_prop_cycle(fig_test, fig_ref):
34423452
ax = fig_ref.subplots()

0 commit comments

Comments
 (0)