如何在Bokeh 0.13中制作和弦图? [英] How to make a chord chart in Bokeh 0.13?
问题描述
Bokeh的早期版本似乎有和弦图:
Previous versions of Bokeh seem to have chord charts:
https://docs.bokeh.org/en/0.12.4/docs/gallery/chord_chart.html
但不是最新版本?
https://docs.bokeh.org/en/latest/docs/gallery/chord_chart.html [404s]
推荐答案
Chord
是bokeh.charts
的一部分,该版本已被弃用并在许多发行版中已删除.现在,使用稳定的bokeh.plotting API可以轻松完成以前bokeh.charts
中的大多数操作,但是Chord
是为数不多的例外之一.我建议您看一下Holoviews,它是一个非常高级的API,可以将和弦图输出为Bokeh(并得到Bokeh项目的正式认可):
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
在Holoviews中,和弦图通常是一两行:
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))
这篇关于如何在Bokeh 0.13中制作和弦图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!