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
# https://github.com/matplotlib/matplotlib/issues/881 | |
# Several of the ColorBrewer maps are "qualitative", meaning | |
# they are just a group of colors that can be used together | |
# for categories of data. So I remapped Accent to segments | |
# instead of continuous: | |
# Actually, these should be used with ListedColormap, and | |
# the number of colors should depend on the number of | |
# categories in the data, with colors removed from the | |
# list in a certain order? |
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
def grouperchunker(seq, size): | |
return (seq[pos:pos + size] for pos in xrange(0, len(seq), size)) | |
for group in grouper(animals, 3): | |
print group | |
from itertools import | |
def grouper(n, iterable, fillvalue=None): |
NewerOlder