Using graphs in network x i can call the following attributes for node n from graph G:
G.node[n]
{'type': 'a', 'pos': [0.22, 0.33]}
I can access different attributes (keys) like the following
G.node[n]['pos']
But I cannot figure out how can I access only the first or second element of ‘pos’? i.e.
0.22
Any ideas?
This gives you the first element: