def get_colors(num=<NUM_LIT:16>, cmap=plt.cm.Set1):
colors = []<EOL>for i in xrange(num):<EOL><INDENT>if analysis_params.bw:<EOL><INDENT>colors.append('<STR_LIT:k>' if i % <NUM_LIT:2> == <NUM_LIT:0> else '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>i *= <NUM_LIT><EOL>if num > <NUM_LIT:1>:<EOL><INDENT>i /= num - <NUM_LIT:1.><EOL><DEDENT>else:<EOL><INDENT>i /= num<EOL><DEDENT>colors.append(cmap(int(i)))<EOL><DEDENT><DEDENT>return colors<EOL>
return a list of color tuples to use in plots