Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bokeh multiple figures with shared legend

Tags:

python

bokeh

When following the bokeh docs for making gridplots, if I use figure's legend keyword argument I get a legend inside each subplot. How could I get a shared legend for the entire gridplot? Further, how could I get a shared legend between say 3 out of 4 of the subplots?

like image 263
user2561747 Avatar asked Feb 28 '16 06:02

user2561747


2 Answers

As of Bokeh 0.13.0, it is not possible to share legends between plots, nor to have legends contain renderers from outside the plot they are defined on. There is an open issue on GitHub you can follow for updates.

like image 190
bigreddot Avatar answered Nov 11 '22 16:11

bigreddot


Since there is no official support.
Here is an advice that barely qualifies as an answer -

You can plot one extra empty figure in your grid with legends ON
which can act as a reference for your plots where legend is OFF.
like image 31
markroxor Avatar answered Nov 11 '22 15:11

markroxor