Pregunta

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?

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top