When you run dot, you should be getting the error message:
Warning: flat edge between adjacent nodes one of which has a record shape - replace records with HTML-like labels
Edge MPGM → M
There was probably some complication with trying to handle this edge using records (I can’t recall what), so it was left unimplemented with the option of using HTML-like labels.
Sorry for necrobumping this thread, but I felt it to be appropriate, as I encountered the exact same warning mentioned here, along with the lost edge. I could not find documentation on this error anywhere, and this is the only graphviz related website that came up searching for the error message.
So, in my case, I have started making graphs using the “record” layout to document control flow of programs. I like the record layout because of its simplicity and nice boxes.
This error came up recently, as the graphs are getting more complex as the project I’m documenting gets more complex, too. The interesting thing is, that the edge was first there (I was building the graph up slowly but surely), and the edge that caused the error, was not the one that I was adding at the end, but one in the middle somewhere, so I guess that it must be related to how graphviz rearranges the nodes and the boxes that contain said nodes.
I’m not that of an advanced user of graphviz, I’ve just started a few moths ago and only used it for this one specific purpose, but I fail to see how changing the style from “records” to “HTML-like labels” would solve the problem as it seems to be caused by the placement of the nodes. Also, I haven’t used “HTML-like labels” before, but they seem much less elegant compared to the “record” style.
Would it be possible to avoid this error by forcing the “rank” of the nodes instead?
It is probably not a question of the sequence of the input, but where (what rank) nodes are placed after the ranking step (see https://www.graphviz.org/pdf/dotguide.pdf if you want more info).
So, am I getting it right, that the “flat edge” in this context means that the edge is between two nodes that are deemed to be of the same rank? Thank you, this is helpful.
On an other note, my graphs are rankdir="LR", I don’t know if that affects anything, but FWIW I tried to test all possible solutions with both LR direction and removing that line to see default behavior.
If I try to use additional nodes and edges to serve as kind of the rank “template” for my nodes, and add something like {rank=same; f; server_game_loadMap} to the end of my graph after the edge definitions, the nodes mentioned there become removed from the clusters and are placed on the graph by themselves, which is suboptimal. GTBbalance seemed to not have any effect on my graph.
However, using minlen=2 actually helped, but I had to change the minlen of an other edge, not the one that was disappeared, but now that I understand what the “flat edge” means and how minlen forces the graph edges more apart, I could find out which edge I need to manipulate to achieve a state of all the edges being present.
I also took a shot to convert the nodes that don’t work to the HTML-type node as suggested by the error message, and that seemed to actually resolve the problem without forcing any of the ranks in any way. And luckily, the TD PORT="something" works exactly the same way as the ports work for the “record” type nodes, so I might in the end just go for the HTML-type solution, as it seems to work no matter how weird the edges are in the node structure.
Thank you again for pointing me in the right direction!