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

Skip to content

Commit 7fb1e01

Browse files
PatchCollection: pass other kwargs for match_original=True
- match_original should only ignore the following kwargs: edgecolors facecolors linewidths linestyles all others should be passed onto the Collection constructor
1 parent 76951f0 commit 7fb1e01

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)