Frage

I have the following graph (and accompanying dot file)

there is original picture

digraph G { 
  a -> c; 
  a -> d; 
  a -> q; 
  a -> x;
  a -> qp; 
}

I want to organize the nodes in the graph "chess style view", like this: Chess style

How can this be achieved?

War es hilfreich?

Lösung

Depending on what exactly your finally after, an other layout algorithm could work for you:

neato -Tpng yourgraph.gv

neato output


The unflatten utility may be a more appropriate solution in some cases:

unflatten -f -l 2 yourgraph.gv | dot -Tpng -o unflattened.png

unflattened graph

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top