I have data in a Pandas dataframe that I am trying to plot to a time series line graph.
When plotting one single line, I have been able to do this quite successfully using the p.line function, ensuring I make the x_axis_type 'datetime'.
To plot multiple lines, I have tried using p.multi_line, which worked well but I also need a legend and, according to this post, it's not possible to add a legend to a multiline: Bokeh how to add legend to figure created by multi_line method?
Leo's answer to the question in the link above looks promising, but I can't seem to work out how to apply this when the data is sourced from a dataframe.
Does anyone have any tips?
fig = figure(), then I just loop through whatever data I'm using, creating a line withfig.line(x=x, y=y, legend="Label for this particular line")for each line I need. Then I just break out of the loop and show the figure, which then shows a single figure with multiple lines.