How to align loose nodes beside the main graph?

My code creates following output:

But I want the the rectangular boxes to be placed beside the graph one below the other

Does anyone have an idea how to achive that? Setting packmode to array_2 brings me a little bit closer to my goal but it removes the edge labels. I tried a lot with rank and size/ratio but that didn’t work as well.

digraph config
{

#packmode="array_c2";

Init [style=filled,fillcolor="#80bfff"]
foo [shape=box, label="Line1_TextTextText\lLine2_TextTextText\lLine3_TextTextText\lLine4_TextTextText\l"]
bar [shape=box, label="Line1_TextTextText\llLine2_TextTextText\lLine3_TextTextText\lLine4_TextTextText\l"]
bar2 [shape=box, label="Line1_TextTextText\llLine2_TextTextText\lLine3_TextTextText\lLine4_TextTextText\l"]

Init -> 1

1 -> 2[label=<
	<I>Block 1  </I><BR/>
		<FONT COLOR="gray"> T2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> T3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A4 </FONT><BR ALIGN="LEFT"/>
>]
2 -> 3[label=<
	<I>Block 3  </I><BR/>

		<FONT COLOR="gray"> T2 </FONT><FONT COLOR="#ff4d4d">Else</FONT><BR ALIGN="LEFT"/>
>]
2 -> 3[label=<
	<I>Block 2  </I><BR/>
		<FONT COLOR="gray"> A2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A4 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A5 </FONT><BR ALIGN="LEFT"/>
>]


3 -> 4[label=<
	<I>Block 4  </I><BR/>
		<FONT COLOR="gray"> A2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A4 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A5 </FONT><BR ALIGN="LEFT"/>
>]

4 -> 1

}

So should it look like:

Add some invisible edges, like so:

digraph config
{
 Init [style=filled,fillcolor="#80bfff"]
foo [shape=box, label="Line1_TextTextText\lLine2_TextTextText\lLine3_TextTextText\lLine4_TextTextText\l"]
bar [shape=box, label="Line1_TextTextText\llLine2_TextTextText\lLine3_TextTextText\lLine4_TextTextText\l"]
bar2 [shape=box, label="Line1_TextTextText\llLine2_TextTextText\lLine3_TextTextText\lLine4_TextTextText\l"]

Init -> 1

1 -> 2[label=<
	<I>Block 1  </I><BR/>
		<FONT COLOR="gray"> T2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> T3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A4 </FONT><BR ALIGN="LEFT"/>
>]
2 -> 3[label=<
	<I>Block 3  </I><BR/>

		<FONT COLOR="gray"> T2 </FONT><FONT COLOR="#ff4d4d">Else</FONT><BR ALIGN="LEFT"/>
>]
2 -> 3[label=<
	<I>Block 2  </I><BR/>
		<FONT COLOR="gray"> A2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A4 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A5 </FONT><BR ALIGN="LEFT"/>
>]

3 -> 4[label=<
	<I>Block 4  </I><BR/>
		<FONT COLOR="gray"> A2 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A3 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A4 </FONT><BR ALIGN="LEFT"/>
		<FONT COLOR="gray"> A5 </FONT><BR ALIGN="LEFT"/>
>]

4 -> 1
edge[ style=invis]
foo -> bar -> bar2
}

Giving:

Thank you! Quite good idea I would never hit on :slight_smile:
In this case the nodes are placed line by line regardless of the lines of the edge-labels. Is there any way to break this behaviour?

Unfortunately the result applied on my data still isn’t what I want:


The second column should not care about the edge lables in the first column…

Otherwise it is not mandatory that the loose nodes are placed in a second column.
Also a nice placement independent of the connected nodes would also be a solution.

Edit: I think I found a solution I can live with.

Just place the table like node in

{
rank=sink
"TABLE"
}

changes everything from


to

I just wonder why the rank of the table affects the look of the main graph.
In bigger graphs it looks quite awful: :sob: