decided the relay will be coded in python
This commit is contained in:
@@ -2,14 +2,17 @@ from pyvis.network import Network
|
||||
|
||||
|
||||
def main():
|
||||
net = Network(notebook=False, cdn_resources="local", neighborhood_highlight=True, bgcolor="#222222", font_color="#FAFAFA", layout="hierarchical")
|
||||
net = Network(notebook=False, cdn_resources="local", neighborhood_highlight=True, bgcolor="#222222", font_color="#FAFAFA", layout=True)
|
||||
|
||||
net.add_nodes([0,1,2,3,4], label=['1','2','3','4','5'],color=['#E0E0FF','#E0FFE0','#E0E0FF','#E0E0FF','#E0E0FF'])
|
||||
net.add_nodes([0,1,2,3,4,5,6], label=['1','2','3','4','5','6','7'],color=['#E0E0FF','#E0FFE0','#E0E0FF','#E0E0FF','#E0E0FF','#E0E0FF','#E0FFE0'])
|
||||
net.add_edge(0, 1, length=500)
|
||||
net.add_edge(1, 2, length=750)
|
||||
net.add_edge(2, 3, length=500)
|
||||
net.add_edge(3, 4, length=250)
|
||||
net.add_edge(2, 4, length=250)
|
||||
net.add_edge(4, 5, length=750)
|
||||
net.add_edge(5, 6, length=500)
|
||||
net.add_edge(1, 6, length=0)
|
||||
|
||||
|
||||
net.write_html("network.html", notebook=False)
|
||||
|
||||
Reference in New Issue
Block a user