title: Preventing edges from crossing nodes in pygraphviz
body: <p>I am reading a JSON file and dynamically creating a graph using pygraphviz, using a simple loop:</p>
  
  <pre><code>hostdata = []
  nodes = []
  edges = {}
  current_host = ""
  trial = pgv.AGraph(strict=False, overlap=False)
  for filename in os.listdir(options.directory):
      with open(options.directory + "/" + filename, "r") as myfile:
          hostdata = Truth(myfile.read().replace('\n', ''))
      nodes.append(hostdata.host["something"])
      current_something = hostdata.host["something"]
      for key, value in hostdata.peer.iteritems():
          nodes.append(key)
          edges[current_something] = key
          trial.add_edge(current_host, key)
  </code></pre>
  
  <p>The graph is complicated, but I really would prefer if the edges don't cross the nodes.  I tried, when I set the strict and overlap, but I still have lines crossing over nodes.</p>
  
  <p><a href="https://i.stack.imgur.com/LaMZa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LaMZa.png" alt="Graph with crossed nodes"></a></p>
  
  <p>This seems like something people would run into a lot, but I can't find anything on it.  I am probably doing something completely wrong, or using the wrong search term.  Any help appreciated.</p>