Fixed node positions in cgraph

I'm using Graphviz and cgraph to layout some graphs and, for some cases, I already know the positions I want my nodes to be at (as they form a subgraph of a bigger graph).

Using the dot command line tool, you can add the -Knop layout option, but if try gvLayout(context, graph, "nop") in my code, or call gvParseArgs for dot -Knop arguments, the resulting graph has no edge routing, even though I have agset(graph, (char*)"splines", (char*)"true") in my code.

Is there any way I can achieve such edge routing for fixed node positions in cgraph?

I recently answered this on

I recently answered this on the mailing list:

 

> positions in cgraph?
Calling gvLayout(context, graph, "nop") does what you want, but the results are stored in the
library data structures.
You can read this information using ED_splines(ep), where ep is an Agedge_t*, or you can "render"
the information
into the string-valued attributes by calling gvRender (context, G, "dot", NULL). You can then read
the edge information from
agget(ep, "pos").

If you are already doing this and it's not working, let us know. Thanks.

Recent comments