在Jupyter笔记本中,我基于存储在数据框中的数据创建了networkx图形对象。现在,我希望绘制一个网络交互图,将鼠标悬停在节点上时将显示它们。
我在开始使用plotty时遇到了麻烦,我似乎找不到任何涵盖使用此库可视化networkx图形对象基础知识的教程。大多数教程都比较高级,可以立即深入研究3D表示形式。
这已经允许我使用matplotlib在Jupyter笔记本中可视化图形。如何使用plotly定制此图?
import networkx as nx
import matplotlib.pyplot as plt
%matplotlib inline
Gp=nx.from_pandas_edgelist(comments, source='text_y', target='text_x', edge_attr=True, create_using = nx.MultiDiGraph)
#draw graph
nx.draw(Gp, with_labels=False)
plt.draw()