Bokeh Migration from 2.0.2 to 2.2.1

I have created a plot using Bokeh 2.0.2,

it worked fine. As follows.

But when I updated the version of Bokeh to 2.2.1 the colouring scheme seems to be disturbed.

I’m using line_color but also tried color as follows but got no luck.

line_colors = {"left": "Red", "right": "Blue", "through": "Green"}
plot.line(plot_data2[agg], plot_data2[agg_by], line_color=line_colors[turn.lower()], line_width=2, legend_label=turnManeuver)

Any thoughts? Fix?

@zia_kayani that’s pretty unusual, to the point that I don’t really have any idea what might be going on. In order to speculate, we’d really need a Minimal, Reproducible Example.

Try using lower-case color names, i.e. replace Red with red, and so on.

1 Like

Good catch, that’s probably it. If things ever worked with capitalized versions it was purely unintentional, we’ve 100% only ever demonstrated use of lower-case color names in all docs and examples. I am surprised this would not emit a loud warning about a missing column name, though.

Thanks @p-himik for your quick response and solution, it worked :heart:

@Bryan I was working on Minimal, Reproducible Example, But its great that we found the issue. I’ll use lower-case now on.

1 Like