52
52
"yellow_orange_red" : [(1.0,1.0,0.0,1.0), (1.0,0.7,0.0,1.0), (1.0,0.2,0.0,1.0)],
53
53
"rainbow" : [(1.0,0.0,0.0,1.0), (1.0,0.5,0.0,1.0), (1.0,1.0,0.0,1.0), (0.0,1.0,0.0,1.0), (0.0,0.0,1.0,1.0), (0.3, 0.0, 0.5,1.0), (0.5, 0.0, 1.0, 1.0)]}
57
57
if theme not in THEMES.keys() :
58
58
raise Exception, "Theme not defined"
59
59
color_steps = THEMES[theme]
60
60
n_colors = len(color_steps)
61
61
if series_length <= n_colors:
64
64
iterations = [(series_length - n_colors)/(n_colors - 1) for i in color_steps[:-1]]
65
65
over_iterations = (series_length - n_colors) % (n_colors - 1)