[dot verbose=true fit=true]
digraph G {
rankdir=TB
node [fontname="Helvetica,Arial,sans-serif"]
edge [fontname="Helvetica,Arial,sans-serif"]
graph [fontsize=30 labelloc="t" label="" splines=false ratio = auto]
subgraph cluster_left {
style=filled
color="#F4F2EE"
fontcolor="black"
fontsize=36
border=0
label = "left side nodes"
//left side nodes
left1 -> left2 -> left3 [penwidth=3 color=deeppink style=dotted dir=none] //vertical edge lines will be made invisible
/* as soon as theese lines are uncommented, the clusters become twisted up
left1->mainA
left2->mainD
left3->mainD
*/
}
subgraph cluster_main {
style=filled
color="#F4F2EE"
fontcolor="black"
fontsize=36
border=0
label = "main steps and\nrelated side nodes"
//main steps
mainA -> mainB -> mainC -> mainD -> mainE [weight=5]
} //main cluster end
subgraph cluster_right {
style=filled
color="#F4F2EE"
fontcolor="black"
fontsize=36
border=0
label = "right side nodes"
//right side nodes
right1 -> right2 -> right3 -> right4 [penwidth=3 color=deeppink style=dotted dir=none] //vertical edge lines will be made invisible
/* as soon as theese lines are uncommented, the clusters become twisted up
right1->mainB
right2->mainC
right3->mainC
right4->mainC
*/
}
} //graph end
[/dot]
Hello all! I’m trying to achieve what maybe is a simple goal with DOT, but after many attempts using online editors, still cannot do with it.
There is a central cluster of vertical nodes, that acts like a rigid, hard “backbone”, where left and right floating nodes point to.
My example graph shows the nodes, but as soon as I use {rank=same …} and edges (with constraint=false) for aligning and connecting, clusters gex mixed, nodes migrate in unpredictable ways from one cluster to another, and the whole graph becomes messy.
What am I doing wrong?
Many thanks!