|  | @@ -5,6 +5,11 @@ import graphviz
 | 
	
		
			
				|  |  |  from yamily import Person, PersonCollection
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +def _add_person_node(graph: graphviz.dot.Digraph, person: Person) -> None:
 | 
	
		
			
				|  |  | +    label = person.name or person.identifier
 | 
	
		
			
				|  |  | +    graph.node(person.identifier, label=label, shape="box")
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  def digraph(collection: PersonCollection) -> graphviz.dot.Digraph:
 | 
	
		
			
				|  |  |      """
 | 
	
		
			
				|  |  |      >>> bob = Person('bob')
 | 
	
	
		
			
				|  | @@ -31,27 +36,27 @@ def digraph(collection: PersonCollection) -> graphviz.dot.Digraph:
 | 
	
		
			
				|  |  |      digraph yamily {
 | 
	
		
			
				|  |  |      	{
 | 
	
		
			
				|  |  |      		rank=same
 | 
	
		
			
				|  |  | -    		grace [shape=box]
 | 
	
		
			
				|  |  | +    		grace [label=grace shape=box]
 | 
	
		
			
				|  |  |      	}
 | 
	
		
			
				|  |  |      	{
 | 
	
		
			
				|  |  |      		rank=same
 | 
	
		
			
				|  |  | -    		carol [shape=box]
 | 
	
		
			
				|  |  | -    		bob [shape=box]
 | 
	
		
			
				|  |  | +    		carol [label=carol shape=box]
 | 
	
		
			
				|  |  | +    		bob [label=bob shape=box]
 | 
	
		
			
				|  |  |      		"relation-bob-carol" [shape=point width=0]
 | 
	
		
			
				|  |  |      		carol -> "relation-bob-carol" [arrowhead=none constraint=False]
 | 
	
		
			
				|  |  |      		bob -> "relation-bob-carol" [arrowhead=none constraint=False]
 | 
	
		
			
				|  |  |      	}
 | 
	
		
			
				|  |  |      	{
 | 
	
		
			
				|  |  |      		rank=same
 | 
	
		
			
				|  |  | -    		frank [shape=box]
 | 
	
		
			
				|  |  | +    		frank [label=frank shape=box]
 | 
	
		
			
				|  |  |      	}
 | 
	
		
			
				|  |  |      	{
 | 
	
		
			
				|  |  |      		rank=same
 | 
	
		
			
				|  |  | -    		alice [shape=box]
 | 
	
		
			
				|  |  | +    		alice [label=alice shape=box]
 | 
	
		
			
				|  |  |      	}
 | 
	
		
			
				|  |  |      	{
 | 
	
		
			
				|  |  |      		rank=same
 | 
	
		
			
				|  |  | -    		david [shape=box]
 | 
	
		
			
				|  |  | +    		david [label=david shape=box]
 | 
	
		
			
				|  |  |      	}
 | 
	
		
			
				|  |  |      	grace -> carol
 | 
	
		
			
				|  |  |      	frank -> bob
 | 
	
	
		
			
				|  | @@ -69,10 +74,10 @@ def digraph(collection: PersonCollection) -> graphviz.dot.Digraph:
 | 
	
		
			
				|  |  |              continue
 | 
	
		
			
				|  |  |          with graph.subgraph() as subgraph:
 | 
	
		
			
				|  |  |              subgraph.attr(rank="same")
 | 
	
		
			
				|  |  | -            subgraph.node(person.identifier, shape="box")  # , str(person))
 | 
	
		
			
				|  |  | +            _add_person_node(subgraph, person)
 | 
	
		
			
				|  |  |              nodes.add(person)
 | 
	
		
			
				|  |  |              for coparent in collection.get_coparents(person):
 | 
	
		
			
				|  |  | -                subgraph.node(coparent.identifier, shape="box")
 | 
	
		
			
				|  |  | +                _add_person_node(subgraph, coparent)
 | 
	
		
			
				|  |  |                  nodes.add(coparent)
 | 
	
		
			
				|  |  |                  parents = tuple(sorted((person, coparent), key=lambda p: p.identifier))
 | 
	
		
			
				|  |  |                  parent_node_name = "relation-{}-{}".format(
 |