title: My Graphviz nodes is on top of each other
body: <p>I want to create a graph with graphviz and python with a lot of nodes. But it renders on top of each other and I cant seem to figure out how to fix the spacing between graphs.</p>
  
  <p>Here is the output:</p>
  
  <p><a href="https://i.stack.imgur.com/c93Mz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c93Mz.png" alt="Output"></a></p>
  
  <p>And here is my code where I generate the nodes:</p>
  
  <pre><code>def build_mind_map(history, site_info):
  mind_map = Graph('mind_map', filename='graph', engine='sfdp', strict=True)
  mind_map.graph_attr = {'label': heading, 'labelloc': "t", "labelfontsize": '13.0', "labeljust": "l"}
  mind_map.graph_attr.update(size="2,2")
  sorted_list = sort_list(site_info)
  nodes_list_0 = []
  nodes_list_1 = []
  g = sorted_list[0]
  nodes_list_0.append(str(g[0]))
  mind_map.attr('node', color='cyan4', style='filled', labelfontsize="20", pad='10')
  mind_map.node(str(g[0]), label="&lt;&lt;font point-size='18'&gt;&lt;B&gt;" + g[0] + "&lt;/B&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&gt;", nodesep="2")
  for j in sorted_list:
      date_string = '\n'
      for d in j[2]:
          date_string = date_string + "\n" + d
      if str(j[0]) not in nodes_list_0:
          mind_map.attr('node', color='crimson', style='filled', pad='10')
          mind_map.node(str(j[0]), label="&lt;&lt;B&gt;" + j[0] + "&lt;/B&gt;&lt;br/&gt;&lt;br/&gt;" + date_string + "&gt;", nodesep="2")
          nodes_list_0.append(str(j[0]))
      if str(j[1]) not in nodes_list_1:
          mind_map.attr('node', color='cyan3', style='filled', pad='10')
          mind_map.node(str(j[1]), label="&lt;&lt;B&gt;" + j[1] + "&lt;/B&gt;&lt;br/&gt;&lt;br/&gt;" + date_string + "&gt;")
          nodes_list_1.append(str(j[1]))
      mind_map.edge(str(j[0]), str(j[1]))
  mind_map.edge(str(g[0]), str(g[1]))
      if history == "1":
      mind_map_second = Graph('mind_map', filename='graph', engine='sfdp')
      mind_map_second.attr('node', color='yellow', style='filled', labelfontsize="20")
      for i in db.get_history_matches():
          m = i[3].split(",")
          info_string = ""
          try:
              if len(m[0]) &gt; 0:
                  info_string += "&lt;br/&gt;Branch: " + m[0]
          except:
              pass
          try:
              if len(m[1]) &gt; 0:
                  info_string += "&lt;br/&gt;Driver: " + m[1]
          except:
              pass
          try:
              if len(m[2]) &gt; 0:
                  info_string += "&lt;br/&gt;Location" + m[2]
          except:
              pass
          try:
              if len(m[3]) &gt; 0:
                  info_string += "&lt;br/&gt;Date: " + m[3]
          except:
              pass
          try:
              if len(m[4]) &gt; 0:
                  info_string += "&lt;br/&gt;CIS: " + m[4]
          except:
              pass
          try:
              if len(m[5]) &gt; 0:
                  info_string += "&lt;br/&gt;CAS: " + m[5]
          except:
              pass
          if str(i[0]) not in nodes_list_0:
              mind_map_second.node(str(i[0]), label="&lt;History Found&lt;br/&gt;&lt;br/&gt;&lt;B&gt;" + i[0] + "&lt;/B&gt;&lt;br/&gt;" + info_string + "&gt;")
              nodes_list_0.append(str(i[0]))
          if str(i[1]) not in nodes_list_1:
              mind_map_second.node(str(i[1]), label="&lt;History Found&lt;br/&gt;&lt;br/&gt;&lt;B&gt;" + i[1] + "&lt;/B&gt;&lt;br/&gt;" + info_string + "&gt;")
              nodes_list_1.append(str(i[1]))
          mind_map_second.edge(str(i[0]), str(i[1]))
  mind_map.subgraph(mind_map_second)
  mind_map.view()
  </code></pre>
  
  <p>Can someone please help me to figure out how to get the spacing sorted. </p>
  
  <p>Thanks</p>