Skip to content

Instantly share code, notes, and snippets.

@nkrumm
Created June 7, 2013 15:27
Show Gist options
  • Save nkrumm/5730109 to your computer and use it in GitHub Desktop.
Save nkrumm/5730109 to your computer and use it in GitHub Desktop.
color generator for matplotlib
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