Hello everyone,
For context, my end goal is to draw a collaboration graph using gvmap, similar to
but specifying my own clusters.
So, I have a graph (see minimal example below) with clusters (which represents coauthors, each cluster is a “topic”, but it’s irrelevant for my question). Inspired by the code above, I try:
sfdp -Goverlap=prism example.gv | gvmap -e -D | neato -Ecolor="#5555555522" -Tpng > out.png
Now, I have three issues:
- sfdp does not “respect” the clusters: what I’d like is that it positions clusters as much as possible “away from each other”. For larger examples, the clusters are spread throughout the graph (this is not visible for such a small example!).
- more concretely on my example (see below), each cluster comes with a “box” which hides the rest of the picture
- also on my example, one of the cluster is filled with black, making it unreadable.
How can I get rid of the “box”, and why is one cluster filled with black?
The main question is the first one:
Given a clustered graph, how to make sfdp “respect” clusters (meaning, put vertices in a cluster all together, and as much as possible clusters far from one another)?
I tried playing with the constant K, to make vertices inside a cluster attract each other, but I couldn’t make them repulse the other ones.
Many thanks for your help!
graph {
"A" [fontsize=30,fontcolor=red]
subgraph cluster1{
"B" [fontsize=10]
"C" [fontsize=10]
"D" [fontsize=20]
"A" -- "B" [weight=1]
"A" -- "C" [weight=1]
"A" -- "D" [weight=1]
"B" -- "C" [weight=1]
}
subgraph cluster2{
"E" [fontsize=10]
"F" [fontsize=10]
"G" [fontsize=20]
"A" -- "E" [weight=1]
"A" -- "F" [weight=1]
"A" -- "G" [weight=1]
"E" -- "E" [weight=1]
}
}