p = figure(width=400, height=400)
x = np.linspace(0, 10)
ncolors = 5
palette = sns.palettes.color_palette('colorblind', ncolors)
colors = itertools.cycle(palette.as_hex())
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?