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

Skip to content

FIX errorbar problem with fillstyle #19784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
10 changes: 10 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3437,6 +3437,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()
Expand Down