This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# extract_backbone.py | |
# Jim Bagrow | |
# Last Modified: 2010-11-18 | |
import sys, os | |
import networkx as nx | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def draw_graph3(networkx_graph,notebook=True,output_filename='graph.html',show_buttons=True,only_physics_buttons=False, | |
height=None,width=None,bgcolor=None,font_color=None,pyvis_options=None): | |
""" | |
This function accepts a networkx graph object, | |
converts it to a pyvis network object preserving its node and edge attributes, | |
and both returns and saves a dynamic network visualization. | |
Valid node attributes include: | |
"size", "value", "title", "x", "y", "label", "color". |