title: Python - draw a graph with node positions
body: <p>I'm trying to create a graph with the following information.       </p>
  
  <pre><code>    n = 6 #number of nodes
      V = []
      V=range(n)# list of vertices
      print("vertices",V)
      # Create n random points
  
      random.seed(1)
      points = []
      pos = []
  
      pos = {i:(random.randint(0,50),random.randint(0,100)) for i in V}
      print("pos =", pos)
  </code></pre>
  
  <p>This gives my positions as </p>
  
  <pre><code>pos = {0: (8, 72), 1: (48, 8), 2: (16, 15), 3: (31, 97), 4: (28, 60), 5: (41, 48)}
  </code></pre>
  
  <p>I want to draw a graph with these nodes and some edges(which can be obtained in some other calculation) using Matplotlib in Python. I've tried it as follows. But didn't work.</p>
  
  <pre><code>    G_1 = nx.Graph()
      nx.set_node_attributes(G_1,'pos',pos)
      G_1.add_nodes_from(V) # V is the set of nodes and V =range(6) 
  
  
      for (u,v) in tempedgelist:
          G_1.add_edge(v, u, capacity=1) # tempedgelist contains my edges as a list ... ex: tempedgelist =  [[0, 2], [0, 3], [1, 2], [1, 4], [5, 3]]
  
  
      nx.draw(G_1,pos, edge_labels=True)
      plt.show()
  </code></pre>
  
  <p>Can someone please help me with this...</p>