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

Skip to content

Commit 3e15a8e

Browse files
committed
Merge pull request #3619 from duncanmmacleod/master
PatchCollection: pass other kwargs for match_original=True
2 parents 5756fbf + 7fb1e01 commit 3e15a8e

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

lib/matplotlib/collections.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,21 +1527,13 @@ def determine_facecolor(patch):
15271527
return patch.get_facecolor()
15281528
return [0, 0, 0, 0]
15291529

1530-
facecolors = [determine_facecolor(p) for p in patches]
1531-
edgecolors = [p.get_edgecolor() for p in patches]
1532-
linewidths = [p.get_linewidth() for p in patches]
1533-
linestyles = [p.get_linestyle() for p in patches]
1534-
antialiaseds = [p.get_antialiased() for p in patches]
1535-
1536-
Collection.__init__(
1537-
self,
1538-
edgecolors=edgecolors,
1539-
facecolors=facecolors,
1540-
linewidths=linewidths,
1541-
linestyles=linestyles,
1542-
antialiaseds=antialiaseds)
1543-
else:
1544-
Collection.__init__(self, **kwargs)
1530+
kwargs['facecolors'] = [determine_facecolor(p) for p in patches]
1531+
kwargs['edgecolors'] = [p.get_edgecolor() for p in patches]
1532+
kwargs['linewidths'] = [p.get_linewidth() for p in patches]
1533+
kwargs['linestyles'] = [p.get_linestyle() for p in patches]
1534+
kwargs['antialiaseds'] = [p.get_antialiased() for p in patches]
1535+
1536+
Collection.__init__(self, **kwargs)
15451537

15461538
self.set_paths(patches)
15471539

0 commit comments

Comments
 (0)