Holoview-边缘检查教程不起作用

问题描述

我正在使用带有bokeh扩展名的holoview,并且尝试使用hv的教程(http://holoviews.org/user_guide/Network_Graphs.html)的“交互式功能”部分。我的环境是在jupyter笔记本上的python 3.6-holoview 1.13.4。

我的代码

hv.extension('bokeh','matplotlib')
# Declare abstract edges
N = 8
node_indices = np.arange(N,dtype=np.int32)
source = np.zeros(N,dtype=np.int32)
target = node_indices
simple_graph = hv.Graph(((source,target),))

def bezier(start,end,control,steps=np.linspace(0,1,100)):
    return (1-steps)**2*start + 2*(1-steps)*steps*control+steps**2*end

x,y = simple_graph.nodes.array([0,1]).T

paths = []
for node_index in node_indices:
    ex,ey = x[node_index],y[node_index]
    paths.append(np.column_stack([bezier(x[0],ex,0),bezier(y[0],ey,0)]))
    
bezier_graph = hv.Graph(((source,(x,y,node_indices),paths))
bezier_graph.relabel('Edge inspection').opts(inspection_policy='edges')

我得到了图形,但是边缘检查不起作用(信息窗口没有出现)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)