Created
October 4, 2014 18:22
-
-
Save duncanmmacleod/91976ed41b20c48c5c87 to your computer and use it in GitHub Desktop.
matplotlib.collections.PatchCollection() shouldn't ignore all kwargs if match_original=True
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py | |
index 9e25ca0..5065834 100644 | |
--- a/lib/matplotlib/collections.py | |
+++ b/lib/matplotlib/collections.py | |
@@ -1527,21 +1527,13 @@ class PatchCollection(Collection): | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment