Skip to content

Instantly share code, notes, and snippets.

@joseberlines
Created January 28, 2021 21:47
Show Gist options
  • Select an option

  • Save joseberlines/a94e9a6718a09235a629537e0214b87f to your computer and use it in GitHub Desktop.

Select an option

Save joseberlines/a94e9a6718a09235a629537e0214b87f to your computer and use it in GitHub Desktop.
# rail connection NUR-LEP
new_edge1 = ipycytoscape.Edge()
new_edge1.data['id'] = "line6"
new_edge1.data['source'] = "NUR"
new_edge1.data['target'] = "LEP"
new_edge1.data['label'] = "150km/h"
# rail connection NUR-FRA
new_edge2 = ipycytoscape.Edge()
new_edge2.data['id'] = "line7"
new_edge2.data['source'] = "NUR"
new_edge2.data['target'] = "FRA"
new_edge2.data['label'] = "150km/h"
ipycytoscape_obj.graph.add_edges([new_edge1,new_edge2])
ipycytoscape_obj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment