Re: [graphviz-interest] Curious node ranking

"Emden R. Gansner" <[email protected]> Mon, 03 Feb 2014 10:59:07 -0500
Newsgroups gmane.comp.video.graphviz
Message-ID <[email protected]>
On 2/3/14 2:42 AM, Pekka Pihlajasaari wrote:
> I have generated Sankey diagrams in Graphviz using HTML-like labels to
> manage the ports positioning the various streams. The attached file
> (Sankey.txt) shows an example where the position of some of the nodes in
> the minimum rank are displayed in a curious order. The lexical
> positioning in the file does not match the laid out order and the
> weighting of the edges does not seem to contradict this.
>
> Initially I suspected the use of penwidth may have affected the layout,
> but see that this has no effect.
>
> Is it possible to understand the reason for this positioning, and is
> there any general solution? Or, is the connectedness of the graph at the
> limits that one should expect (nearly) correct processing?
>
>
It is not clear what you mean by correct processing. If you mean that 
you want the nodes in the
minimal rank to appear in the order they are defined, this is usually 
the starting point. But the dot
algorithm then does crossing minimization. This may well permute the 
order of nodes within a rank.
If you want to constrain the order of nodes within a rank, try adding a 
chain of invisible edges between
those nodes.

      Emden


_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest