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

Skip to content

Commit 632700b

Browse files
committed
Fix test failure (caused by corner case in np.concatenate).
1 parent dccfc6b commit 632700b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/matplotlib/legend.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,10 @@ def _auto_legend_data(self):
749749
transform = handle.get_transform()
750750
bboxes.append(handle.get_path().get_extents(transform))
751751

752-
vertices = np.concatenate([l.vertices for l in lines])
752+
try:
753+
vertices = np.concatenate([l.vertices for l in lines])
754+
except ValueError:
755+
vertices = np.array([])
753756

754757
return [vertices, bboxes, lines]
755758

0 commit comments

Comments
 (0)