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

Skip to content

Commit 315ff06

Browse files
authored
Merge pull request #19818 from meeseeksmachine/auto-backport-of-pr-19784-on-v3.4.x
Backport PR #19784 on branch v3.4.x (FIX errorbar problem with fillstyle)
2 parents da2e2b0 + 56c53bd commit 315ff06

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
@@ -3414,6 +3414,16 @@ def test_errobar_nonefmt():
34143414
assert np.all(errbar.get_color() == mcolors.to_rgba('C0'))
34153415

34163416

3417+
def test_errorbar_fillstyle():
3418+
# Check that passing 'fillstyle' keyword will not result in errors
3419+
x = np.arange(5)
3420+
y = np.arange(5)
3421+
3422+
plotline, _, _ = plt.errorbar(x, y, xerr=1, yerr=1, ls='None',
3423+
marker='s', fillstyle='full')
3424+
assert plotline.get_fillstyle() == 'full'
3425+
3426+
34173427
@check_figures_equal(extensions=['png'])
34183428
def test_errorbar_with_prop_cycle(fig_test, fig_ref):
34193429
ax = fig_ref.subplots()

0 commit comments

Comments
 (0)