Permalink
Browse files

Fix bug in _auto_legend_data which caused the vertex list to always b…

…e empty.
  • Loading branch information...
1 parent 8cc3c08 commit 96c0dca0b770d480817b936a48065765ba704a98 @maxalbert committed Jan 6, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/matplotlib/legend.py
View
@@ -729,7 +729,6 @@ def _auto_legend_data(self):
assert self.isaxes
ax = self.parent
- vertices = []
bboxes = []
lines = []
@@ -750,6 +749,8 @@ 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])
+
return [vertices, bboxes, lines]
def draw_frame(self, b):

0 comments on commit 96c0dca

Please sign in to comment.