问题标签 [pyvis]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Pyvis 图不会停止移动
我正在尝试制作一个项目,在其中从 python 项目创建图表。我有这个代码
这可以很好地创建图表。但是,当我创建它时,图形在我的屏幕上飞来飞去,实际上不可能看到它。
如果我删除 Displayer.barnes_hut(overlap=1),则它不会移动,但是节点都只是堆叠在一起,并且再次无法破译图形。
如何获得既站立(合理)静止又可读的图表?
python-3.x - Pyvis 网络不断发展
我有一个文本语料库,我想将单词的共现可视化为一个网络。为此,我创建了一个 pd 数据框,其中包含和cooc_pd列。前两个是节点,表示两个节点(单词)在一个设置的 window_size 内出现的频率。SourceTargetWeightWeight
然后,我使用以下代码绘制网络:
如果我选择一个较低的权重包含阈值,图表中会显示许多连接。然而,在这种情况下,节点在example.html不断移动,解释很困难。有没有办法(除了增加阈值)使节点停止移动?
python - Networkx 图导出到 Pyvis - TypeError:int64 类型的对象不是 JSON 可序列化的
我有一个如下的数据框
我正在使用一个函数来生成网络图。下面的函数使用数据框、节点和边来生成图表。
调用上述函数
图表信息
当我尝试使用pyvis. 我收到 TypeError:int64 类型的对象不是 JSON 可序列化的
以下是完整的错误
我认为错误来自 Graph 网络,但我不确定这到底发生在哪里以及如何解决这个问题......
任何人都可以解决这个问题吗?
python - How to place the nodes of a graph using pyVis following the coordinate system (latitude and longitude)?
I am using the python libraries pyVis and Networkx to visualise graphs where each node is a port somewhere in the world and each link is a route between ports. The situation is as follows: with pyVis I can tell it the positions of the nodes (x and y) but when I use the longitude and latitude of the ports it doesn't place them properly, I guess it's because I'm using coordinates in an HTML page without any processing. My question is: can I use some pyVis method to tell it that the positions are coordinates and therefore change the reference system of the HTML page or do I have to write the code to do it?
Thank you, I leave the code in case it can help you.
python - PyVis - 搜索节点
我正在使用 PyVis 构建一个图表(本质上是一个调用链)。所以我喜欢它如何生成一个带有相关代码的 html 文件来可视化它。
有没有办法可以生成“搜索节点”功能?我正在加载的图表很大,而放大到感兴趣节点的功能是我正在寻找的......
python - 如何在 NetworkX Graph 的 pyvis 可视化中显示按钮?
我正在尝试修改此功能以正确显示交互式按钮。我正在使用pyvis可视化在Networkx. 尽管包括N.show_buttons(filter_=True),但按钮不会出现在相应的 html 文件中。另外,如何为生成的 html 页面添加标题?
python - 如何在pyvis中绘制具有社区结构的图
我有一个边缘列表,其中节点是字符串值,例如城市名称。在对它们应用社区检测算法后,我得到了带有标签的城市,具有相同标签的城市被分组在同一个社区中。我想可视化具有相同标签的城市用相同颜色着色的城市图表。谁能帮我这个?我什至不知道 pyvis 有没有这个功能?
我可以使用以下代码绘制图表:
但我不知道如何根据检测到的社区将标签附加到节点。



