I am a new user of python and networkx and I want to ask you that how to add attributes to graphs,nodes and edges in networkx?When I try to add it there is an error Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
    G[1][3]['color']='blue'
KeyError: 3
I have searched for attribute package for networkx but not found.
 
     
     
    