Skip to content

Commit 50f864e

Browse 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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/axes/_axes.py

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy