graphvizcircos

Reduce distance between nodes in circo layout


I have a graph with circo layout which generates some nodes (highlighted on the screenshot) too far from the root. I would like to reduce the distance between highlighted nodes and the root node in red square.

enter image description here

Graph definition is quite simple

digraph G {
compound=true
node [shape=box, fontsize=12]
edge [arrowhead=both]
normalize=true
mindist=0.8

Node0, Node1, Node2, Node3, Node4, Node5, Node6, Node7, Node8, Node9, Node10, Node11, Node12, Node13, Node14, Node15
Node16, Node17, Node18, Node19, Node20, Node21, Node22, Node23, Node24, Node25, Node26, Node27, Node28, Node29, Node30, Node31
Node32, Node33, Node34, Node35, Node36, Node37, Node38, Node39, Node40, Node41, Node42, Node43, Node44, Node45, Node46, Node47
Node48, Node49, Node50, Node51, Node52, Node53, Node54, Node55, Node56, Node57, Node58, Node59, Node60, Node61, Node62, Node63
Node64, Node65, Node66, Node67, Node68, Node69, Node70, Node71, Node72, Node73, Node74, Node75, Node76, Node77, Node78, Node79
Node80, Node81, Node82, Node83, Node84, Node85, Node86, Node87, Node88, Node89, Node90, Node91, Node92, Node93, Node94, Node95
Node96, Node97, Node98, Node99, Node100, Node101, Node102, Node103, Node104, Node105, Node106, Node107, Node108, Node109, Node110, Node111
Node112, Node113, Node114, Node115, Node116, Node117, Node118, Node119, Node120, Node121, Node122, Node123, Node124, Node125, Node126, Node127
Node128, Node129, Node130, Node131, Node132, Node133, Node134, Node135, Node136

Node0 -> Node48
Node1 -> Node51
Node2 -> Node98
Node3 -> Node61
Node4 -> Node74
Node5 -> Node33
Node6 -> Node20
Node7 -> Node28
Node8 -> Node33
Node9 -> Node76
Node10 -> Node95
Node11 -> Node76
Node12 -> Node32
Node14 -> Node55
Node15 -> Node51
Node16 -> Node32
Node18 -> Node54
Node19 -> Node84
Node20 -> Node54
Node21 -> Node55
Node22 -> Node54
Node23 -> Node32
Node24 -> Node22
Node25 -> Node81
Node26 -> Node124
Node27 -> Node98
Node28 -> Node66
Node29 -> Node76
Node30 -> Node48
Node31 -> Node20
Node32 -> Node5
Node33 -> Node104
Node34 -> Node28
Node35 -> Node95
Node36 -> Node98
Node37 -> Node48
Node38 -> Node61
Node39 -> Node22
Node40 -> Node51
Node41 -> Node74
Node42 -> Node61
Node43 -> Node76
Node44 -> Node28
Node45 -> Node74
Node46 -> Node98
Node47 -> Node22
Node48 -> Node54
Node49 -> Node20
Node50 -> Node74
Node51 -> Node5
Node52 -> Node95
Node53 -> Node32
Node54 -> Node5
Node55 -> Node33
Node56 -> Node22
Node57 -> Node98
Node59 -> Node32
Node61 -> Node54
Node62 -> Node95
Node63 -> Node54
Node64 -> Node76
Node65 -> Node51
Node66 -> Node5
Node67 -> Node20
Node68 -> Node55
Node69 -> Node128
Node71 -> Node98
Node72 -> Node61
Node73 -> Node76
Node74 -> Node5
Node75 -> Node51
Node76 -> Node51
Node77 -> Node51
Node79 -> Node54
Node80 -> Node18
Node81 -> Node5
Node82 -> Node48
Node83 -> Node74
Node84 -> Node66
Node85 -> Node81
Node86 -> Node1
Node87 -> Node51
Node88 -> Node55
Node89 -> Node33
Node90 -> Node18
Node91 -> Node61
Node92 -> Node106
Node93 -> Node32
Node94 -> Node32
Node95 -> Node66
Node96 -> Node32
Node97 -> Node32
Node98 -> Node51
Node99 -> Node84
Node100 -> Node32
Node101 -> Node128
Node102 -> Node51
Node105 -> Node76
Node106 -> Node81
Node107 -> Node76
Node109 -> Node89
Node110 -> Node74
Node111 -> Node51
Node112 -> Node74
Node113 -> Node108
Node114 -> Node28
Node115 -> Node84
Node116 -> Node76
Node117 -> Node61
Node118 -> Node32
Node119 -> Node108
Node120 -> Node32
Node121 -> Node84
Node122 -> Node51
Node123 -> Node18
Node124 -> Node5
Node125 -> Node76
Node126 -> Node54
Node127 -> Node66
Node128 -> Node54
Node129 -> Node98
Node130 -> Node18
Node131 -> Node32
Node132 -> Node28
Node133 -> Node74
Node134 -> Node66
Node135 -> Node84
Node136 -> Node76
}

I couldn't find any property to reduce the distance


Solution

  • In theory, the weight attribute should make some difference in edge lengths. In practice, no apparent difference.
    There is an existing Graphviz issue about this (https://gitlab.com/graphviz/graphviz/-/issues/2198), so you are probably out of luck.