Created
December 13, 2020 19:10
-
-
Save joseberlines/6bf66f6ad3d72ddeb5519b5d38959570 to your computer and use it in GitHub Desktop.
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
| train_style.append({'selector': 'node[classes="EU"]', | |
| 'style': {'background-color': 'orange'}}) | |
| train_style.append({'selector': 'edge[classes="EU"]', | |
| 'style': {'font-family': 'arial', | |
| 'font-size': '10px', | |
| 'label': 'data(label)'}}) | |
| ipycytoscape_obj3 = ipycytoscape.CytoscapeWidget() | |
| ipycytoscape_obj3.graph.add_graph_from_json(railnetJSON) | |
| ipycytoscape_obj3.graph.add_node(station_NUR) | |
| ipycytoscape_obj3.graph.add_edges([new_edge1,new_edge2]) | |
| ipycytoscape_obj3.graph.add_nodes(new_EU_stations) | |
| ipycytoscape_obj3.graph.add_edges(new_EU_rails) | |
| ipycytoscape_obj3.set_style(train_style) | |
| ipycytoscape_obj3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment