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

Skip to content

Commit 84efa33

Browse files
committed
Fix bug using autolegend with LineCollection.
svn path=/branches/v0_91_maint/; revision=5706
1 parent bf8769a commit 84efa33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/legend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ def _auto_legend_data(self):
375375

376376
for handle in ax.collections:
377377
if isinstance(handle, LineCollection):
378-
hlines = handle.get_lines()
378+
hlines = handle._segments
379379
trans = handle.get_transform()
380380
for line in hlines:
381381
tline = trans.seq_xy_tups(line)
382-
aline = [inv(v) for v in tline]
382+
aline = [inv(tuple(v)) for v in tline]
383383
lines.append(aline)
384384

385385
return [vertices, bboxes, lines]

0 commit comments

Comments
 (0)