Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 50f864e

Browse filesBrowse files
authored
Merge pull request #27925 from meeseeksmachine/auto-backport-of-pr-27921-on-v3.8.x
Backport PR #27921 on branch v3.8.x (Avoid modifying user input to Axes.bar)
2 parents 3986012 + 7c62f87 commit 50f864e
Copy full SHA for 50f864e

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,7 +2394,8 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
23942394
# checking and processing will be left to the errorbar method.
23952395
xerr = kwargs.pop('xerr', None)
23962396
yerr = kwargs.pop('yerr', None)
2397-
error_kw = kwargs.pop('error_kw', {})
2397+
error_kw = kwargs.pop('error_kw', None)
2398+
error_kw = {} if error_kw is None else error_kw.copy()
23982399
ezorder = error_kw.pop('zorder', None)
23992400
if ezorder is None:
24002401
ezorder = kwargs.get('zorder', None)
@@ -2550,9 +2551,8 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
25502551

25512552
error_kw.setdefault("label", '_nolegend_')
25522553

2553-
errorbar = self.errorbar(ex, ey,
2554-
yerr=yerr, xerr=xerr,
2555-
fmt='none', **error_kw)
2554+
errorbar = self.errorbar(ex, ey, yerr=yerr, xerr=xerr, fmt='none',
2555+
**error_kw)
25562556
else:
25572557
errorbar = None
25582558

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.