diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 82ee7918c25d..cee4fa1cc7ec 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3372,6 +3372,7 @@ def errorbar(self, x, y, yerr=None, xerr=None, base_style.pop('markeredgecolor', None) base_style.pop('markevery', None) base_style.pop('linestyle', None) + base_style.pop('fillstyle', None) # Make the style dict for the line collections (the bars). eb_lines_style = {**base_style, 'color': ecolor} diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index ed76af576f64..1bf4577f4a66 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -3414,6 +3414,16 @@ def test_errobar_nonefmt(): assert np.all(errbar.get_color() == mcolors.to_rgba('C0')) +def test_errorbar_fillstyle(): + # Check that passing 'fillstyle' keyword will not result in errors + x = np.arange(5) + y = np.arange(5) + + plotline, _, _ = plt.errorbar(x, y, xerr=1, yerr=1, ls='None', + marker='s', fillstyle='full') + assert plotline.get_fillstyle() == 'full' + + @check_figures_equal(extensions=['png']) def test_errorbar_with_prop_cycle(fig_test, fig_ref): ax = fig_ref.subplots()