Issue with vertices and edges that are getting hidden

Hi,

I have this graph

The picture shows that some nodes, the center of each hexagon for example, and some edges are behind the shapes.
In the dot file ( and I don’t know if that matters ) the statements for the centers are always after the statements of the corresponding hexagon.
But the SVG output file does not have the same order and I guess that the rendering order is based on the document order.

How could I have the centers and the edges in the front ?

Thanks

First: really nice graph!
Yes, the order of the input matters.
Also, the subgraphs that were defined with the radial edges caused problems.
I reordered the input, eliminated redundant definition of center_frame, and replaced all the radial edges with 3 long edges.

digraph {  graph[layout="neato" label="3"]

// bottom layer
xleft[shape="point" pos="-5,0!"]
xright[shape="point" pos="5,0!"]
yup[shape="point" pos="0,4!"]
ydown[shape="point" pos="0,-4!"]

// next: hexagons
hexa_1_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.45000000000000007,0.25980762113533157!"]
hexa_1_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="3.181725716174721e-17,0.5196152422706632!"]
hexa_1_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.44999999999999996,0.2598076211353318!"]
hexa_1_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.4500000000000001,-0.25980762113533146!"]
hexa_1_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-9.545177148524163e-17,-0.5196152422706632!"]
hexa_1_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.4499999999999999,-0.25980762113533185!"]
hexa_2_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.9000000000000001,0.5196152422706631!"]
hexa_2_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="6.363451432349442e-17,1.0392304845413265!"]
hexa_2_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.8999999999999999,0.5196152422706636!"]
hexa_2_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.9000000000000002,-0.5196152422706629!"]
hexa_2_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.9090354297048326e-16,-1.0392304845413265!"]
hexa_2_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.8999999999999998,-0.5196152422706637!"]
hexa_3_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.3500000000000003,0.7794228634059948!"]
hexa_3_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="9.545177148524163e-17,1.5588457268119897!"]
hexa_3_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.3499999999999999,0.7794228634059954!"]
hexa_3_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.3500000000000003,-0.7794228634059944!"]
hexa_3_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-2.8635531445572486e-16,-1.5588457268119897!"]
hexa_3_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.3499999999999996,-0.7794228634059955!"]

// center_frame was defined several times, redundant
center_frame[shape="point" width="0.01" pos="0,0!" color="black" label=""]

center_3_0[shape="point" color="#000080" width="0.05" pos="1.3500000000000003,0.7794228634059948!"]
center_3_1[shape="point" color="#000080" width="0.05" pos="9.545177148524163e-17,1.5588457268119897!"]
center_3_2[shape="point" color="#000080" width="0.05" pos="-1.3499999999999999,0.7794228634059954!"]
center_3_3[shape="point" color="#000080" width="0.05" pos="-1.3500000000000003,-0.7794228634059944!"]
center_3_4[shape="point" color="#000080" width="0.05" pos="-2.8635531445572486e-16,-1.5588457268119897!"]
center_3_5[shape="point" color="#000080" width="0.05" pos="1.3499999999999996,-0.7794228634059955!"]

hexa_4_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.8000000000000003,1.0392304845413263!"]
hexa_4_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.2726902864698884e-16,2.078460969082653!"]
hexa_4_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.7999999999999998,1.0392304845413272!"]
hexa_4_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.8000000000000005,-1.0392304845413258!"]
hexa_4_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-3.818070859409665e-16,-2.078460969082653!"]
hexa_4_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.7999999999999996,-1.0392304845413274!"]

// next layer circles
circle_1[shape="circle" label="" width="1.0392304845413265" pos="0,0!" penwidth="0.2"]
circle_2[shape="circle" label="" width="2.078460969082653" pos="0,0!" penwidth="0.2"]
circle_3[shape="circle" label="" width="3.1176914536239795" pos="0,0!" penwidth="0.2"]
circle_4[shape="circle" label="" width="4.156921938165306" pos="0,0!" penwidth="0.2"]

// last (top) layer center points
center_2_0[shape="point" color="#000080" width="0.05" pos="0.9000000000000001,0.5196152422706631!"]
center_2_1[shape="point" color="#000080" width="0.05" pos="6.363451432349442e-17,1.0392304845413265!"]
center_2_2[shape="point" color="#000080" width="0.05" pos="-0.8999999999999999,0.5196152422706636!"]
center_2_3[shape="point" color="#000080" width="0.05" pos="-0.9000000000000002,-0.5196152422706629!"]
center_2_4[shape="point" color="#000080" width="0.05" pos="-1.9090354297048326e-16,-1.0392304845413265!"]
center_2_5[shape="point" color="#000080" width="0.05" pos="0.8999999999999998,-0.5196152422706637!"]

center_1_0[shape="point" color="#000080" width="0.05" pos="0.45000000000000007,0.25980762113533157!"]
center_1_1[shape="point" color="#000080" width="0.05" pos="3.181725716174721e-17,0.5196152422706632!"]
center_1_2[shape="point" color="#000080" width="0.05" pos="-0.44999999999999996,0.2598076211353318!"]
center_1_3[shape="point" color="#000080" width="0.05" pos="-0.4500000000000001,-0.25980762113533146!"]
center_1_4[shape="point" color="#000080" width="0.05" pos="-9.545177148524163e-17,-0.5196152422706632!"]
center_1_5[shape="point" color="#000080" width="0.05" pos="0.4499999999999999,-0.25980762113533185!"]
center_4_0[shape="point" color="#000080" width="0.05" pos="1.8000000000000003,1.0392304845413263!"]
center_4_1[shape="point" color="#000080" width="0.05" pos="1.2726902864698884e-16,2.078460969082653!"]
center_4_2[shape="point" color="#000080" width="0.05" pos="-1.7999999999999998,1.0392304845413272!"]
center_4_3[shape="point" color="#000080" width="0.05" pos="-1.8000000000000005,-1.0392304845413258!"]
center_4_4[shape="point" color="#000080" width="0.05" pos="-3.818070859409665e-16,-2.078460969082653!"]
center_4_5[shape="point" color="#000080" width="0.05" pos="1.7999999999999996,-1.0392304845413274!"]

// finally edges
xleft -> xright[]
yup   -> ydown[]

// replace all the node-to-node edges with 3 long edges
/*  
center_frame -> {  center_1_0 center_1_1 center_1_2 center_1_3 center_1_4 center_1_5 }[dir="none" penwidth="0.2"]
center_frame -> {  center_2_0 center_2_1 center_2_2 center_2_3 center_2_4 center_2_5 }[dir="none" penwidth="0.2"]
center_frame -> {  center_3_0 center_3_1 center_3_2 center_3_3 center_3_4 center_3_5 }[dir="none" penwidth="0.2"]
center_frame -> {  center_4_0 center_4_1 center_4_2 center_4_3 center_4_4 center_4_5 }[dir="none" penwidth="0.2"]
*/

edge [dir="none" penwidth="0.2"]
center_4_0 -> center_4_3
center_4_1 -> center_4_4
center_4_2 -> center_4_5

frame[shape="rectangle" width="10" height="8" pos="0,0!" label=""]
}

Thanks for your kind comment !

I think that I understood the behavior.
The fact that the “center_frame” node statement was specify before some hexagons seems to be the origin of the problem.
Indeed, as center_frame is the origin of each edge, the edge itself is behind and as the edge itself is behind the end node is behind too. ( it’s just a guess )

Anyway, I simplified the graph to highlight that.

digraph {  
graph[layout="neato" label="0"]
xleft -> xright[]
yup   -> ydown[]
xleft[shape="point" pos="-5,0!"]
xright[shape="point" pos="5,0!"]
yup[shape="point" pos="0,4!"]
ydown[shape="point" pos="0,-4!"]

//If I place the statement here, we have the problem
center_frame[shape="point" width="0.01" pos="0,0!" color="black" label=""]

hexa_1_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.45000000000000007,0.25980762113533157!"]
hexa_1_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="3.181725716174721e-17,0.5196152422706632!"]
hexa_1_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.44999999999999996,0.2598076211353318!"]
hexa_1_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.4500000000000001,-0.25980762113533146!"]
hexa_1_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-9.545177148524163e-17,-0.5196152422706632!"]
hexa_1_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.4499999999999999,-0.25980762113533185!"]

center_1_0[shape="point" color="#000080" width="0.05" pos="0.45000000000000007,0.25980762113533157!"]
center_1_1[shape="point" color="#000080" width="0.05" pos="3.181725716174721e-17,0.5196152422706632!"]
center_1_2[shape="point" color="#000080" width="0.05" pos="-0.44999999999999996,0.2598076211353318!"]
center_1_3[shape="point" color="#000080" width="0.05" pos="-0.4500000000000001,-0.25980762113533146!"]
center_1_4[shape="point" color="#000080" width="0.05" pos="-9.545177148524163e-17,-0.5196152422706632!"]
center_1_5[shape="point" color="#000080" width="0.05" pos="0.4499999999999999,-0.25980762113533185!"]

circle_1[shape="circle" label="" width="1.0392304845413265" pos="0,0!" penwidth="0.2"]

//If I place the statement here after all the hexagons statements, everything is OK
//center_frame[shape="point" width="0.01" pos="0,0!" color="black" label=""]
center_frame -> {  center_1_0 center_1_1 center_1_2 center_1_3 center_1_4 center_1_5 }[dir="none" penwidth="0.2"]
frame[shape="rectangle" width="10" height="8" pos="0,0!" label=""]
 
}

Finally :

digraph {  
graph[layout="neato" label="3"]

// bottom layer
xleft[shape="point" pos="-5,0!"]
xright[shape="point" pos="5,0!"]
yup[shape="point" pos="0,4!"]
ydown[shape="point" pos="0,-4!"]

// next: hexagons
hexa_1_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.45000000000000007,0.25980762113533157!"]
hexa_1_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="3.181725716174721e-17,0.5196152422706632!"]
hexa_1_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.44999999999999996,0.2598076211353318!"]
hexa_1_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.4500000000000001,-0.25980762113533146!"]
hexa_1_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-9.545177148524163e-17,-0.5196152422706632!"]
hexa_1_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.4499999999999999,-0.25980762113533185!"]
hexa_2_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.9000000000000001,0.5196152422706631!"]
hexa_2_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="6.363451432349442e-17,1.0392304845413265!"]
hexa_2_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.8999999999999999,0.5196152422706636!"]
hexa_2_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-0.9000000000000002,-0.5196152422706629!"]
hexa_2_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.9090354297048326e-16,-1.0392304845413265!"]
hexa_2_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="0.8999999999999998,-0.5196152422706637!"]
hexa_3_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.3500000000000003,0.7794228634059948!"]
hexa_3_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="9.545177148524163e-17,1.5588457268119897!"]
hexa_3_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.3499999999999999,0.7794228634059954!"]
hexa_3_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.3500000000000003,-0.7794228634059944!"]
hexa_3_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-2.8635531445572486e-16,-1.5588457268119897!"]
hexa_3_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.3499999999999996,-0.7794228634059955!"]

center_3_0[shape="point" color="#000080" width="0.05" pos="1.3500000000000003,0.7794228634059948!"]
center_3_1[shape="point" color="#000080" width="0.05" pos="9.545177148524163e-17,1.5588457268119897!"]
center_3_2[shape="point" color="#000080" width="0.05" pos="-1.3499999999999999,0.7794228634059954!"]
center_3_3[shape="point" color="#000080" width="0.05" pos="-1.3500000000000003,-0.7794228634059944!"]
center_3_4[shape="point" color="#000080" width="0.05" pos="-2.8635531445572486e-16,-1.5588457268119897!"]
center_3_5[shape="point" color="#000080" width="0.05" pos="1.3499999999999996,-0.7794228634059955!"]

hexa_4_0[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.8000000000000003,1.0392304845413263!"]
hexa_4_1[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.2726902864698884e-16,2.078460969082653!"]
hexa_4_2[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.7999999999999998,1.0392304845413272!"]
hexa_4_3[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-1.8000000000000005,-1.0392304845413258!"]
hexa_4_4[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="-3.818070859409665e-16,-2.078460969082653!"]
hexa_4_5[shape="polygon" sides="6" width="0.6" height="0.5196152422706632" label="" color="black" style="filled" fillcolor="#7fffd4" penwidth="0.1" pos="1.7999999999999996,-1.0392304845413274!"]

// next layer circles
circle_1[shape="circle" label="" width="1.0392304845413265" pos="0,0!" penwidth="0.2"]
circle_2[shape="circle" label="" width="2.078460969082653" pos="0,0!" penwidth="0.2"]
circle_3[shape="circle" label="" width="3.1176914536239795" pos="0,0!" penwidth="0.2"]
circle_4[shape="circle" label="" width="4.156921938165306" pos="0,0!" penwidth="0.2"]

// last (top) layer center points
center_2_0[shape="point" color="#000080" width="0.05" pos="0.9000000000000001,0.5196152422706631!"]
center_2_1[shape="point" color="#000080" width="0.05" pos="6.363451432349442e-17,1.0392304845413265!"]
center_2_2[shape="point" color="#000080" width="0.05" pos="-0.8999999999999999,0.5196152422706636!"]
center_2_3[shape="point" color="#000080" width="0.05" pos="-0.9000000000000002,-0.5196152422706629!"]
center_2_4[shape="point" color="#000080" width="0.05" pos="-1.9090354297048326e-16,-1.0392304845413265!"]
center_2_5[shape="point" color="#000080" width="0.05" pos="0.8999999999999998,-0.5196152422706637!"]

center_1_0[shape="point" color="#000080" width="0.05" pos="0.45000000000000007,0.25980762113533157!"]
center_1_1[shape="point" color="#000080" width="0.05" pos="3.181725716174721e-17,0.5196152422706632!"]
center_1_2[shape="point" color="#000080" width="0.05" pos="-0.44999999999999996,0.2598076211353318!"]
center_1_3[shape="point" color="#000080" width="0.05" pos="-0.4500000000000001,-0.25980762113533146!"]
center_1_4[shape="point" color="#000080" width="0.05" pos="-9.545177148524163e-17,-0.5196152422706632!"]
center_1_5[shape="point" color="#000080" width="0.05" pos="0.4499999999999999,-0.25980762113533185!"]
center_4_0[shape="point" color="#000080" width="0.05" pos="1.8000000000000003,1.0392304845413263!"]
center_4_1[shape="point" color="#000080" width="0.05" pos="1.2726902864698884e-16,2.078460969082653!"]
center_4_2[shape="point" color="#000080" width="0.05" pos="-1.7999999999999998,1.0392304845413272!"]
center_4_3[shape="point" color="#000080" width="0.05" pos="-1.8000000000000005,-1.0392304845413258!"]
center_4_4[shape="point" color="#000080" width="0.05" pos="-3.818070859409665e-16,-2.078460969082653!"]
center_4_5[shape="point" color="#000080" width="0.05" pos="1.7999999999999996,-1.0392304845413274!"]

// finally edges
xleft -> xright[ ]
yup   -> ydown[]

// This is the important part, the center_frame is specify here
center_frame[shape="point" width="0.01" pos="0,0!" color="black" label=""]

// I kept all the node-to-node edges
center_frame -> {  center_1_0 center_1_1 center_1_2 center_1_3 center_1_4 center_1_5 }[dir="none" penwidth="0.2"]
center_frame -> {  center_2_0 center_2_1 center_2_2 center_2_3 center_2_4 center_2_5 }[dir="none" penwidth="0.2"]
center_frame -> {  center_3_0 center_3_1 center_3_2 center_3_3 center_3_4 center_3_5 }[dir="none" penwidth="0.2"]
center_frame -> {  center_4_0 center_4_1 center_4_2 center_4_3 center_4_4 center_4_5 }[dir="none" penwidth="0.2"]


//edge [dir="none" penwidth="0.2"]
//center_4_0 -> center_4_3
//center_4_1 -> center_4_4
//center_4_2 -> center_4_5

frame[shape="rectangle" width="10" height="8" pos="0,0!" label=""]
}

As you might guess I don’t edit manually these types of graphs. Everything is generated automatically, so I really had to understand what is the root cause.

please correct me if I am wrong.