I want to use a loop to load and/or modify data and plot the result within the loop using Bokeh (I am familiar with Matplotlib\'s axes.color_cycle). Here is a simple exampl
In Python > 3.7 you could do something like this:
from bokeh.palettes import Category10_10
color = Category10_10.__iter__()
p.line(x, y1, line_width=2, color=next(color))
This will cycle through each element of the list until exhausted each time you use next()
.
Every sequence type in python can return an iterator object.