According to https://graphviz.org/docs/attrs/minlen, edge attribute “minlen” is an integer. However, attribute “len” is a double (https://graphviz.org/docs/attrs/len). I would expect that for layout purposes, the user would want a very small number for the minimum separation between nodes. What is the logic behind making it an integer? Am I understanding its purpose correctly? I haven’t found much other explanation about it.
Digging through the codebase a little, edge.minlen is indeed defined as an ‘unsigned short’ (integer).
https://gitlab.com/graphviz/graphviz/-/blob/main/lib/common/types.h#L573
I wonder what the units of minlen are.
minlen says “Note: dot only.”, and len says “Note: neato, fdp only.”
So I think the attributes might be somewhat confusing unrelated, operating on different layout engines?
Unfortunately, I can’t offer any thoughts on that because I am a fledgling user of GraphViz. But the “len” page says that it is in inches.
I am in fact using “FDP” (force directed placement). Specifically neato’s stress majorization, which apparently is a modernization of Kamada-Kawai layout.
AFTERNOTE
I’m not sure how you managed to respond to this question, as I’m just now realizing that I got notification that my question was spam. In fact, I’m getting many such notices, including a notification a few minutes ago about a question that I posted months ago. Hopefully, it’s an erroneous message only, and my newer postings from today aren’t really hidden from public view.
Your account was flagged for spam automatically by discourse for “This new user tried to create multiple posts with links to the same domain”. It’s funny that would trigger for our own domain. I’ve unflagged-for-spam and restored the post.
I see that len is in inches, but if minlen is an integer, that’d be very coarse-grained if it were inches, so I suspect minlen is some other unit.
minlen is in units of “rank” (i.e. minlen=3 means at least 3 ranks down or over).
So, integers are appropriate.
I see. Since “neato” uses it’s own layout algorithm, I guess there’s no point trying to use “minlen”. I can impose a lower limit on the lengths by preprocessing them. Thanks.
This is correct.
It’s not useful to this discussion, but Gordon Woodhull did an implementation of k-layered layout (i.e. dot-like) where the layers can be very fine increments. This could be generally useful if we had the bandwidth
Sorry, Steve, I lack the context to appreciate that final comment. Do you mean layers of nodes, with edges between layers as well as within layers? It’s not something I’m looking at now.