Search code examples
pythonnetworkxgml

Does networkx.readGml() function store the widths and heights of the nodes? If it does, how can they be accesed?


I have a gml file in which nodes have non-uniform dimensions. I read the file with the following command:

G = nx.Graph(nx.read_gml('test.gml'))

I am not sure if this command reads the widths and heights from the gml file and whether it stores them or not.

Is reading these values possible? If yes, then how?


Solution

  • The read_gml() command does read the widths and heights if mentioned in the gml file. It can be accessed with G.nodes[id].data()