p = figure(width=400, height=400)
x = np.linspace(0, 10)
colors = itertools.cycle(palette)
for m, color in zip(range(10), colors):
    y = m * x
p.line(x, y, legend='m = {}'.format(m), color=color)
p.legend.location = 'top_left'
show(p)
When plotting with Bokeh, how do you automatically cycle through a color pallette?