How to make a chord chart in Bokeh 0.13?

不想你离开。 提交于 2019-12-10 17:28:29

问题


Previous versions of Bokeh seem to have chord charts:

https://docs.bokeh.org/en/0.12.4/docs/gallery/chord_chart.html

But not the latest version?

https://docs.bokeh.org/en/latest/docs/gallery/chord_chart.html [404s]


回答1:


Chord was part of bokeh.charts which was deprecated and removed many release ago. Most things that used to be in the old bokeh.charts are now simple to accomplish with the stable bokeh.plotting API, but Chord is one of the few exceptions. I would suggest looking at Holoviews, which is a very high level API that can output chord plots as Bokeh (and is officially endorsed by the Bokeh project):

http://holoviews.org/reference/elements/bokeh/Chord.html

With Holoviews, chord plots are typically a line or two:

%%opts Chord [label_index='name' color_index='index' edge_color_index='source'] 
%%opts Chord (cmap='Category20' edge_cmap='Category20')
hv.Chord((links, nodes)).select(value=(5, None))


来源:https://stackoverflow.com/questions/51718517/how-to-make-a-chord-chart-in-bokeh-0-13

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!