Permalink
Browse files

Fix test failure (caused by corner case in np.concatenate).

  • Loading branch information...
1 parent dccfc6b commit 632700b9d36d8ecdc6d7e13eafedc5f6ccb6a49a @maxalbert committed Jan 8, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/matplotlib/legend.py
View
@@ -749,7 +749,10 @@ def _auto_legend_data(self):
transform = handle.get_transform()
bboxes.append(handle.get_path().get_extents(transform))
- vertices = np.concatenate([l.vertices for l in lines])
+ try:
+ vertices = np.concatenate([l.vertices for l in lines])
+ except ValueError:
+ vertices = np.array([])
return [vertices, bboxes, lines]

0 comments on commit 632700b

Please sign in to comment.