8000 Some minor optimizations · matplotlib/matplotlib@b3ac14c · GitHub
[go: up one dir, main page]

Skip to content

Commit b3ac14c

Browse files
committed
Some minor optimizations
1 parent 474bf00 commit b3ac14c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/matplotlib/legend.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,8 @@ def _auto_legend_data(self):
979979
lines.append(
980980
artist.get_transform().transform_path(artist.get_path()))
981981
elif isinstance(artist, PolyCollection):
982-
paths = artist.get_paths()
983-
for path in paths:
984-
lines.append(artist.get_transform().transform_path(path))
982+
lines.extend(artist.get_transform().transform_path(path)
983+
for path in artist.get_paths())
985984
elif isinstance(artist, Collection):
986985
transform, transOffset, hoffsets, _ = artist._prepare_points()
987986
if len(hoffsets):

0 commit comments

Comments
 (0)
0