首页 > 解决方案 > 如何从 Python/R 中的联系人列表动画网络增长?

问题描述

问题:我想使用 Python 3 动画时间网络的增长,最好是 Jupyter 笔记本中的 networkx 和 matplotlib 等库。但是,我也很感谢用 R 语言提供的任何帮助并解决我的问题。

数据:我有以下形式的联系人列表:contact_list=[(time1,node1,node2),(time2,node1,node3), (time3,node2,node1)...]
在联系人列表中我有 92 个不同节点和大约 4000 个联系人。

现在我想可视化我的网络在一段时间内的增长。

动画:我的动画应该有以下要求:

  1. 一开始我希望所有节点都出现在屏幕上并且它们之间没有边缘。
  2. 对于 contact_list 中的每个 CONTACT:

      *change a time count to the time assigned to the CONTACT
    
      *highlight with a different color nodes which are assigned to the 
      present CONTACT and draw a new edge if there wasn't any between 
      them before
    

这是我想获得的动画的示例帧:

frames_to_the_animation

预先感谢您的帮助!

标签: pythonranimationnetworking

解决方案


推荐阅读