title: Networkx: how to show node and edge attributes in a graph drawing
body: <p>I have a graph G with attribute 'state' for nodes and edges. I want to draw the graph, all nodes labelled, and with the state marked outside the corresponding edge/node. </p>
  
  <pre><code>for v in G.nodes():     
      G.node[v]['state']='X'
  G.node[1]['state']='Y' 
  G.node[2]['state']='Y'
  
  for n in G.edges_iter():    
      G.edge[n[0]][n[1]]['state']='X'
  G.edge[2][3]['state']='Y'
  </code></pre>
  
  <p>The command draw.networkx has an option for labels, but I do not understand how to provide the attribute as a label to this command. Could someone help me out? </p>