Hierarchical graph with a parameter

giuliot
2010-12-14
2013-04-20
  • giuliot
    giuliot
    2010-12-14

    Hi,
    I have a directed graph that has the following structure: Each node "i"  has a parameter N_i associated with it. There is a vertex from "i"  to "j" only if N_i < N_j.  So it's clear that in this graph there is a hierarchical structure and I was wondering what is the best way for representing this kind of graph. I tried using the hierachical layout  but it seems that doesn't respect the natural order that the nodes have (that one given by the parameter N_x). The ideal would be having a vertical representation of the graph in which the y coordinate of the nodes respect the order given by the parameter N_i and in which the x coordinate of each node would be so that to minimize the intersection of the edges (so that an application of the edge bundling algorithm would be even more efficient).

    Thanks a lot,

    Giulio 

     
  • David Auber
    David Auber
    2010-12-15

    Hi,

    You are right hierarchical algorithm are exactly what you need.
    in tulip you can use the tulip hierachical algorithm
    use these parameters (if your nodes have got a size of (1,1,1);
    node size (viewsize)
    orientation (vertical)
    layer spacing 2
    node spacing 2

    else you can also use the ogdf sugyama algorithm (look in the plugin server).

    wishes,
    David.

    PS: the aspect ratio of hierachical layout are often really bad use the option Force ratio in the menu->option
    to re scale automatically your layout.

    If tulip doesn't fit your needs dot from Graphviz do a really good job on that kind of graphs. (you can re-import the generated  dot file in tulip after if you want :) )

     
  • giuliot
    giuliot
    2010-12-18

    Hi,
    Thanks a lot for the hints.

    Giulio