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 ef5d01a

Browse filesBrowse files
authored
Merge pull request #10710 from dopplershift/fix-error
BUG: Fix UnboundLocalError in contour labelling
2 parents 86a3c94 + ca9502e commit ef5d01a
Copy full SHA for ef5d01a

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎lib/matplotlib/contour.py

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

0 commit comments

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