I’m working with the yfiles_jupyter_graphs package in a Jupyter notebook to visualize a graph created with NetworkX.
I want to achieve two things:
-
Access Node Positions: How can I programmatically access the positions of each node after the graph has been laid out? I would like to retrieve the (x, y) coordinates of all nodes.
-
Export Graph as GraphML: Is there a way to save the graph directly as a GraphML file using code, without having to manually click "Export to yEd Live" in the widget?
I tried the .get_node_position_mapping() method but the output is:
<function GraphWidget.default_node_position_mapping at 0x0000022797E35670>
Any guidance or examples would be greatly appreciated!
You need to sign in to view this answers