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

Skip to content

Commit 50104a7

Browse files
committed
Remove some unnecessary masking in errorbar.
These variables are not used within these `if` blocks, and aren't meant to be used outside of them either.
1 parent e768849 commit 50104a7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3469,8 +3469,7 @@ def extract_err(name, err, data, lolims, uplims):
34693469
mlines.Line2D(lo, yo, marker='|', **eb_cap_style),
34703470
mlines.Line2D(ro, yo, marker='|', **eb_cap_style)])
34713471
if xlolims.any():
3472-
xo, yo, lo, ro = apply_mask([x, y, left, right],
3473-
xlolims & everymask)
3472+
xo, yo, ro = apply_mask([x, y, right], xlolims & everymask)
34743473
if self.xaxis_inverted():
34753474
marker = mlines.CARETLEFTBASE
34763475
else:
@@ -3481,8 +3480,7 @@ def extract_err(name, err, data, lolims, uplims):
34813480
caplines.append(mlines.Line2D(
34823481
xo, yo, marker='|', **eb_cap_style))
34833482
if xuplims.any():
3484-
xo, yo, lo, ro = apply_mask([x, y, left, right],
3485-
xuplims & everymask)
3483+
xo, yo, lo = apply_mask([x, y, left], xuplims & everymask)
34863484
if self.xaxis_inverted():
34873485
marker = mlines.CARETRIGHTBASE
34883486
else:
@@ -3506,8 +3504,7 @@ def extract_err(name, err, data, lolims, uplims):
35063504
mlines.Line2D(xo, lo, marker='_', **eb_cap_style),
35073505
mlines.Line2D(xo, uo, marker='_', **eb_cap_style)])
35083506
if lolims.any():
3509-
xo, yo, lo, uo = apply_mask([x, y, lower, upper],
3510-
lolims & everymask)
3507+
xo, yo, uo = apply_mask([x, y, upper], lolims & everymask)
35113508
if self.yaxis_inverted():
35123509
marker = mlines.CARETDOWNBASE
35133510
else:
@@ -3518,8 +3515,7 @@ def extract_err(name, err, data, lolims, uplims):
35183515
caplines.append(mlines.Line2D(
35193516
xo, yo, marker='_', **eb_cap_style))
35203517
if uplims.any():
3521-
xo, yo, lo, uo = apply_mask([x, y, lower, upper],
3522-
uplims & everymask)
3518+
xo, yo, lo = apply_mask([x, y, lower], uplims & everymask)
35233519
if self.yaxis_inverted():
35243520
marker = mlines.CARETUPBASE
35253521
else:

0 commit comments

Comments
 (0)