Skip to content

Instantly share code, notes, and snippets.

@joseberlines
Created December 13, 2020 19:10
Show Gist options
  • Select an option

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

Select an option

Save joseberlines/6bf66f6ad3d72ddeb5519b5d38959570 to your computer and use it in GitHub Desktop.
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