title: NetworkX: Node labels are drawn randomly
body: <p>So I wanted to draw labels for each of my node (1-20), but somehow these labels are just drawn randomly on the graph (check screen below).</p>
  
  <pre><code>network = nx.DiGraph()
  counter = 0
  for i in range(1,21):
      network.add_node(i, label = str(i))
  with open('mreza.csv', newline='') as csvfile:
      reader = csv.reader(csvfile, delimiter=';', quotechar='|')
      for row in reader:
          for item in row:
              item = item.strip('(').strip(')').split(',')
              startVertex = int(item[0])
              endVertex = int(item[1])
              network.add_weighted_edges_from([(startVertex, endVertex, matchingArray[counter])])
              counter = counter + 1
  pos=nx.spring_layout(network)
  nx.draw(network)
  labels = nx.draw_networkx_labels(network,pos,font_size=10)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rLjPG.png" rel="nofollow noreferrer">nan</a></p>