The image shown looks cluttered even though I have changed the rank to LR. This is generated by a tool and I have to modify it myself.
This answer has a possible solution. I understand that if I am able to assign numbers to the nodes I can use the solution.
Am I right ? I will be able to modify this large dot file using Java code.
I have tried this.
overlap=scale ;
splines=true;
Are there other solutions I should investigate ?
I have copied part of the file here.
digraph "cxf-api-2.1.3.jar" {
// Path: cxf-api-2.1.3.jar
"org.apache.cxf" -> "java.io (java.base)";
"org.apache.cxf" -> "java.lang (java.base)";
"org.apache.cxf" -> "java.lang.reflect (java.base)";
"org.apache.cxf" -> "java.util (java.base)";
"org.apache.cxf" -> "java.util.logging (java.logging)";
"org.apache.cxf" -> "org.apache.cxf (cxf-api-2.1.3.jar)";
Using rankdir=LR
only changed the graph from horizontal to vertical layout, which didn't help much in your case. The helping trick in the answer you mentioned, was that you pick a few items and group them together on same line :
{rank = same; sample1 sample10 sample20 }
...and you use real names, same as elsewhere in your graph. You have to experiment, but the idea was to choose items which are far enough from each others, so that wrapping actually makes the new graph more readable.
One more thing: you have limited choice in grouping items. The full list of ranking options is "same", "min", "source", "max", "sink", but I've had limited success only with rank=same
and rank=sink
.