Why is the graph with the top to the bottom of the graph laid out counterclockwise?

I updated the question using graphics and more details. Thanks to the scratcher, without hacking, I could not create the desired results in the form of images.

why does this code create this graph?

digraph {
 rankdir = TB;
 1 -> 2 -> 3 -> 1;
}

How can I get graphviz / dot to create a clockwise direction?

Update

This is the final graph that I want to generate (afaik logically corrects this path)

digraph {
  rankdir = TB
  start -> 1
  1 -> 2 -> 3 -> 1
  3 -> end
  3 -> increment
  end -> product
  {rank = same; 2; 3; increment}
  {rank = same; end; product}
}

What gives this result

As long as I want it

thank

+3
source share
1 answer

Why does this code create this graph?

. 1 2, 2, 2 3, 3. 3 1, - . Graphviz node . , :

2 -> 3 -> 1 -> 2;

node 2 ,

3 -> 1 -> 2 -> 3;

node 3 node.

, neato , :

neato layout

,

digraph {
  rankdir = TB;
  1 -> 2;
  3 -> 2 [dir=back];
  3 -> 1;
  {rank=same; 2; 3;}
}

, 2- > 3 3- > 2 .

, , : (1- > 3- > 2- > 1), (dir = ) force node 2 3 :

rankdir = TB;
edge[dir=back];
1 -> 3 -> 2 -> 1;
{rank=same; 2;3;}

:

hack

+8

Source: https://habr.com/ru/post/1789807/


All Articles