8000 Merge pull request #10712 from matplotlib/auto-backport-of-pr-10710 · matplotlib/matplotlib@7046022 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 7046022

Browse files
authored
Merge pull request #10712 from matplotlib/auto-backport-of-pr-10710
Backport PR #10710 on branch v2.2.x
2 parents 4dbc220 + 1749c2e commit 7046022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def calc_label_rot_and_inline(self, slc, ind, lw, lc=None, spacing=5):
441441
# Actually break contours
442442
if closed:
443443
# This will remove contour if shorter than label
444-
if np.all(I != -1):
444+
if all(i != -1 for i in I):
445445
nlc.append(np.row_stack([xy2, lc[I[1]:I[0]+1], xy1]))
446446
else:
447447
# These will remove pieces of contour if they have length zero

0 commit comments

Comments
 (0)
0