Skip to content

Instantly share code, notes, and snippets.

@steveroush
Created February 6, 2026 00:32
Show Gist options
  • Select an option

  • Save steveroush/77498d67e29d07d15dbe2606deecc75b to your computer and use it in GitHub Desktop.

Select an option

Save steveroush/77498d67e29d07d15dbe2606deecc75b to your computer and use it in GitHub Desktop.
Graphviz / dot init_rank test: init_rank_5.gv
/*********************************************************************
as of version <<dot - graphviz version 14.1.3~dev.20260124.0732 (20260124.0732)>>
this file: init_rank_5.gv
triggers the 'trouble in init_rank' bug
(see https://gitlab.com/graphviz/graphviz/-/issues/1213)
***********************************************************************/
/***********************************************************************
gvstats.gvpr output:
file: init_rank_5.gv
nodes: 19
edges: 32
clusters: 3
connected graphs: 3
HTML labels: 0
record nodes: 0
(degree is the count of edges connecting to a node)
degree: 1 node count: 1
degree: 2 node count: 5
degree: 3 node count: 7
degree: 4 node count: 5
degree: 12 node count: 1
***********************************************************************/
digraph anonymous {
graph [labelloc=t,
size="4,4"
];
subgraph g__1 {
graph [labelloc=t,
rank=same,
size="4,4"
];
"n.1" [label="\N",
shape=box,
style=filled];
"n.2" [label="\N",
shape=oval,
style=filled];
"n.3" [label="\N",
shape=box,
style=filled];
}
subgraph cluster__2 {
graph [labelloc=t,
size="4,4"
];
"n.1";
"n.4" [label="\N",
shape=box,
style=filled];
"n.5" [label="\N",
shape=oval,
style=filled];
}
subgraph cluster__3 {
graph [color=lightblue,
labelloc=t,
size="4,4",
style=filled
];
"n.6" [color=white,
label="\N",
shape=box,
style=filled];
"n.7" [color=white,
label="\N",
shape=box,
style=filled];
"n.8" [color=white,
label="\N",
shape=box,
style=filled];
"n.9" [color=white,
label="\N",
shape=box,
style=filled];
"n.10" [color=white,
label="\N",
shape=box,
style=filled];
"n.11" [color=white,
label="\N",
shape=box,
style=filled];
}
subgraph cluster__4 {
graph [color=blue,
labelloc=t,
size="4,4"
];
"n.12" [color=yellow,
label="\N",
shape=box,
style=filled];
"n.13" [color=yellow,
label="\N",
shape=box,
style=filled];
"n.14" [color=yellow,
label="\N",
shape=box,
style=filled];
"n.15" [color=yellow,
label="\N",
shape=box,
style=filled];
"n.16" [color=yellow,
label="\N",
shape=box,
style=filled];
}
"n.1" -> "n.2" [label=Edg1];
"n.1" -> "n.3" [label=Edg2];
"n.1" -> "n.4" [label=Edg3];
"n.17" [label="\N",
shape=oval,
style=filled];
"n.1" -> "n.17" [label=Edg4];
"n.18" [label="\N",
shape=oval,
style=filled];
"n.1" -> "n.18" [label=Edg5];
"n.19" [label="\N",
shape=oval,
style=filled];
"n.1" -> "n.19" [label=Edg6];
"n.2" -> "n.1" [label=Edg7];
"n.4" -> "n.1" [label=Edg8];
"n.4" -> "n.5" [label=Edg9];
"n.5" -> "n.1" [label=Edg10];
"n.6" -> "n.7" [label=Edg11];
"n.6" -> "n.8" [label=Edg12];
"n.6" -> "n.9" [label=Edg13];
"n.10" -> "n.7" [label=Edg14];
"n.10" -> "n.8" [label=Edg15];
"n.10" -> "n.9" [label=Edg16];
"n.11" -> "n.7" [label=Edg17];
"n.11" -> "n.8" [label=Edg18];
"n.11" -> "n.9" [label=Edg19];
"n.12" -> "n.13" [label=Edg20];
"n.12" -> "n.14" [label=Edg21];
"n.12" -> "n.15" [label=Edg22];
"n.12" -> "n.16" [label=Edg23];
"n.13" -> "n.14" [label=Edg24];
"n.13" -> "n.15" [label=Edg25];
"n.13" -> "n.16" [label=Edg26];
"n.14" -> "n.15" [label=Edg27];
"n.14" -> "n.16" [label=Edg28];
"n.15" -> "n.16" [label=Edg29];
"n.17" -> "n.1" [label=Edg30];
"n.18" -> "n.1" [label=Edg31];
"n.19" -> "n.1" [label=Edg32];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment