Skip to content

Commit

Permalink
Merge pull request #3619 from duncanmmacleod/master
Browse files Browse the repository at this point in the history
PatchCollection: pass other kwargs for match_original=True
  • Loading branch information
tacaswell committed Oct 11, 2014
2 parents 5756fbf + 7fb1e01 commit 3e15a8e
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions lib/matplotlib/collections.py
Expand Up @@ -1527,21 +1527,13 @@ def determine_facecolor(patch):
return patch.get_facecolor()
return [0, 0, 0, 0]

facecolors = [determine_facecolor(p) for p in patches]
edgecolors = [p.get_edgecolor() for p in patches]
linewidths = [p.get_linewidth() for p in patches]
linestyles = [p.get_linestyle() for p in patches]
antialiaseds = [p.get_antialiased() for p in patches]

Collection.__init__(
self,
edgecolors=edgecolors,
facecolors=facecolors,
linewidths=linewidths,
linestyles=linestyles,
antialiaseds=antialiaseds)
else:
Collection.__init__(self, **kwargs)
kwargs['facecolors'] = [determine_facecolor(p) for p in patches]
kwargs['edgecolors'] = [p.get_edgecolor() for p in patches]
kwargs['linewidths'] = [p.get_linewidth() for p in patches]
kwargs['linestyles'] = [p.get_linestyle() for p in patches]
kwargs['antialiaseds'] = [p.get_antialiased() for p in patches]

Collection.__init__(self, **kwargs)

self.set_paths(patches)

Expand Down

0 comments on commit 3e15a8e

Please sign in to comment.