3

I am trying to set the number of columns in the legend using bokeh. Using matplotlib there is a simple keyword ncol but I cannot find a way to do it in bokeh.

Any help appreciated.

1
  • without code! please add your code(abstract case) here, for the future readers Commented Dec 8, 2016 at 17:20

1 Answer 1

6

As of Bokeh 0.12.3 Bokeh legends only support complete orientations 'horizontal' or 'vertical':

http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#orientation

So you could have a legend arranged horizontally in one row and several columns, by doing

plot.legend.orientation = "horizontal"

But there is not any way to have e.g. a legend with two rows by two columns. There is an open issue on GitHub to add this capability as a feature.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.