Mobi Zaman
Mobi Zaman

Reputation: 645

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?

Upvotes: 1

Views: 39

Answers (1)

Mobi Zaman
Mobi Zaman

Reputation: 645

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()

Upvotes: 0

Related Questions