Created
June 7, 2013 15:27
-
-
Save nkrumm/5730109 to your computer and use it in GitHub Desktop.
color generator for matplotlib
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
NUM_COLORS = 22 | |
cm = get_cmap('gist_rainbow') | |
for i in range(NUM_COLORS): | |
color = cm(1.*i/NUM_COLORS) # color will now be an RGBA tuple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment