使用散景图在多列上设置图例

Setting Legend on multiple columns with Bokeh Charts

我正在尝试使用散景设置图例中的列数。使用 matplotlib 有一个简单的关键字 ncol 但我找不到在散景中实现它的方法。

感谢任何帮助。

自散景 0.12.3 散景图例仅支持完整方向 'horizontal''vertical':

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

所以你可以将图例水平排列成一行和几列,方法是

plot.legend.orientation = "horizontal"

但是没有任何办法两行两列的图例。有一个 open issue on GitHub 可以将此功能添加为一项功能。