I am creating a graph with multiple clusters. There are edges between nodes belonging to the same cluster, and edges between nodes belonging to different clusters. I am using fdp
layout. Is there a way to have one type of edge routing for nodes within a cluster, and another type of edge routing for nodes belonging to different clusters?
For example, I would like to use splines=ortho
for the former, and splines=compound
for the latter. I tried doing just that, but it appears that the generated graph just uses the splines
value specified in the main graph.
I am pretty sure it can't be done with a single pass - splines is a graph-level attribute. However I think it could be done with a 5-pass technique:
Whew! Sounds gross, but it seems to work
p.s. -s option is needed on steps 3 and 5 to fix scaling issues
p.p.s. because pinning nodes is required, fdp and neato only (not dot)
Here is a command line:
f=multispline.gv;
F=`basename $f .gv`
fdp -Gsplines=true -Tdot $f |
gvpr -c 'N{pin="true"}E[keep=="1"]{keeppos=$.pos}'|
fdp -s -Gsplines=ortho -Tdot |
gvpr -c 'E[keeppos!=""]{pos=keeppos}' |
neato -s -n2 -Tsvg >oo.svg