diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 9158200900d4..c7e569de56af 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3373,6 +3373,11 @@ def errorbar(self, x, y, yerr=None, xerr=None, base_style.pop('markevery', None) base_style.pop('linestyle', None) base_style.pop('fillstyle', None) + base_style.pop('drawstyle', None) + base_style.pop('dash_capstyle', None) + base_style.pop('dash_joinstyle', None) + base_style.pop('solid_capstyle', None) + base_style.pop('solid_joinstyle', 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 93ec68285742..3e0d67a6e047 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -3420,14 +3420,21 @@ 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 +def test_errorbar_fillstyle_drawstyle(): + # Check that passing 'fillstyle' and 'drawstyle' 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') + marker='s', fillstyle='full', + drawstyle='steps-mid', + dash_capstyle='round', + dash_joinstyle='miter', + solid_capstyle='butt', + solid_joinstyle='bevel') assert plotline.get_fillstyle() == 'full' + assert plotline.get_drawstyle() == 'steps-mid' @check_figures_equal(extensions=['png'])