我使用以下定义生成pyvis图:
g = net。网络(笔记本=True,宽度= 100%,高度= 1500px,标题。="THIS appear DOUBLE…", cdn_resources="in_line", select_menu=True)
然而,在结果图上,我得到了两次标题!
我确信我只创建了一个图形。
有什么提示吗?
Thanks a lot
是在最近的更新中引起的问题,问题创建。https://github.com/WestHealth/pyvis/issues/219
作为临时解决方案,您可能需要post处理生成的html文件以删除重复的Header。
html_str = nt.html.replace('</center>', 'xxxxxxx' + '</p>n</center>')
# this actually edits heading, change code to remove second occurance
h = open(path,'w')
h.write(html_str)
h.close()