title: Matplotlib - How to plot with coordinates of the nodes?
body: <p>I am currently solving a vehicle routing problem and i want to visualise my solution base on the scatter plot. However, how do I connect lets say for example Node1 to Node 5?</p>
  <p>I want to connect to a particular node base on my solution.</p>
  <p><a href="https://i.stack.imgur.com/kVIQK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kVIQK.png" alt="enter image description here" /></a></p>
  <p>edit: I have tried using matplotlib as mentioned, but i can't get the coordinates.</p>
  <p><a href="https://i.stack.imgur.com/AXOqr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AXOqr.png" alt="enter image description here" /></a></p>
  <p>The code is written as stated below.</p>
  <pre><code>import networkx as nx
  import numpy as np
  import matplotlib.pyplot as plt
  import warnings
  warnings.filterwarnings(&quot;ignore&quot;, category=UserWarning)
  
  # G = nx.Graph()
  G = nx.DiGraph(directed=True)
  G.add_edges_from(
      [('0', '3'), ('3', '6'), ('6', '0'), ('0', '5'), ('5', '4'),
       ('4', '0'), ('0', '2'), ('2', '1'), ('1', '0')])
  
  val_map = {'1': 1.0,
             '5': 0.5714285714285714,
             '6': 0.0}
  
  values = [val_map.get(node, 0.25) for node in G.nodes()]
  
  # nx.draw(G, cmap = plt.get_cmap('jet'), node_color = values)
  # nx.draw_networkx(G[, pos, arrows, with_labels])
  
  options = {
      'node_color': 'green',
      'node_size': 800,
      'width': 3,
      'arrowstyle': '-|&gt;',
      'arrowsize': 20,
  }
  nx.draw_networkx(G, arrows=True, **options)
  
  plt.show()
  </code></pre>
  <p>Also, the coordinates of the nodes are given as follows from node0-6 respectively:</p>
  <pre><code>data['locations'] = [(1106, 3368.76),
  (97.497, 230.937), (55.514, 2920.53),  
  (44.019, 5588.47), (2499.09, 242.61),
  (2652.1, 2932.21), (2640.87, 5615.41),]
      
  </code></pre>
  <p>PS. I have another problem with this is that the graph kepts changing whenever I run it. How do I make it fix?</p>