2

When generating a bokeh plot using python with many categories, for instance a bar plot, the legend will not fit entirely in the screen and it is not possible to scroll.

Is there a way to scroll a legend?

Thank you

Nuno Silva
  • 108
  • 10

1 Answers1

2

There is no scroll option for the legend.

Some suggestions from this answer:

  • The legend is drawn on the same canvas as the plot, so you could show more of your legend by increasing the plot size.
  • You could decrease the legend font size with p.legend.label_text_font_size = "8px"
Jasper
  • 1,795
  • 1
  • 12
  • 17
  • I would add, there is an [open issue](https://github.com/bokeh/bokeh/issues/3880) to make Legend "tabular" (i.e. with rows and columns) but it is not implemented yet as of 1.3.4. – bigreddot Aug 13 '19 at 14:53
  • Since the release of bokeh 3.1 (march '23) the option of grided tabulare exists. – mosc9575 Mar 14 '23 at 16:29