문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top