Re: [graphviz-interest] A problem with rank = same

Ron Savage <[email protected]> Fri, 05 Sep 2014 09:04:49 +1000
Newsgroups gmane.comp.video.graphviz
Message-ID <[email protected]>
Hi Emden

On 05/09/14 06:57, Emden R. Gansner wrote:
>> Is that a bug in Graphviz or have I misunderstood something?
> It is a bug, but not the one you think. The original ranking algorithm
> used in dot was especially cautious. In particular,
> a node could not be involved in two constraints, a constraint being
> containment in a cluster or involvement in a rank=...
> So what you are seeing is dot quietly ignoring the rank=same constraint
> because node_2 and node_3 are in a cluster.
> The bug is that dot should produce a warning about this.
>
> This approach seemed too cautious, as it prohibited many perfectly
> reasonable situations as, for example, in your graph.
>
> Since 2.30, dot supports a new ranking algorithm that is much more
> flexible. At present, it is still not the default, so you
> need to set newrank=true to get it. If you do this, you'll see node_2
> and node_3 in the cluster and on the same rank.

I tried newrank = true both at the graph and subgraph levels, and 
-Gnewrank on the command line, but none made any difference.

Do I have to do something else as well (besides rank = same in the 
subgraph of course).

Also, I can't see newrank on 
http://www.graphviz.org/content/command-line-invocation or 
http://www.graphviz.org/content/attrs.

> For the record, if you comment out "subgraph" but leave in "cluster",
> cluster denotes a node and you end up with an
> edge from node_1 to cluster.

Understood.

-- 
Ron Savage - savage.net.au
_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest