Skip to content
Advertisement

Position the legend outside the plot area with Bokeh

I am making a plot following the example found here

Unfortunately, I have 17 curves I need to display, and the legend overlaps them. I know I can create a legend object that can be displayed outside the plot area like here, but I have 17 curves so using a loop is much more convenient.

Do you know how to combine both methods?

Advertisement

Answer

Ok, I found the solution. See the code below where I have just modified the interactive legend example:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement