title: how to get edges from networkx to color differently
body: <p>I've built a tree image, see <a href="https://stackoverflow.com/questions/4051414/phylo-biopython-building-trees">question</a>.<br>
  Now I've some major groups.<br>
  One group has nodes with color green and brown, and has a 'B' and a 'A'. The second group has only pink nodes and 'T' and the last group has yellow, orange and blue, and the letters 'L', 'X' and 'H'. the colors refer to the colors of the nodes and the letters belong to the name. So I want to color the edge of the different groups.  </p>
  
  <pre><code>#taken from draw_graphviz
  def get_label_mapping(G, selection): 
      for node in G.nodes(): 
          if (selection is None) or (node in selection): 
              try: 
                  label = str(node) 
                  if label not in (None, node.__class__.__name__): 
                      yield (node, label) 
              except (LookupError, AttributeError, ValueError): 
                  pass
  
  
  labels = dict(get_label_mapping(G, None))
  for label in labels.keys():
  if str(label) != "Clade":
          num = label.name.split('-')
          if 'T' in num[0]:
              node_colors.append('#CC6699')
          elif 'X' in num[0]:
              node_colors.append('r')
          else:
              node_colors.append('y')
  </code></pre>
  
  <p>so I've done a similar function to the above, instead of node, I changed to get_edge.
  and try this:</p>
  
  <pre><code>  for edge in edges.keys():
          if str(edge) != "Clade":
              if 'T' in edge:
                  edge_colors.append('b')
  </code></pre>
  
  <p>where edge is:  </p>
  
  <pre><code>(Clade(branch_length=-0.00193, name='T-7199-8'), Clade(branch_length=0.00494))
  </code></pre>
  
  <p>perhaps there's a way to say if T is in name, then color the edge.
  What to you think?</p>
  
  <p>anyone knows how to do this?</p>
  
  <p>Thank you </p>