Graphviz has a "rank" feature that allows nodes in a "subgraph" to be displayed at the same level. I would like to use this (or another feature?) to accomplish what I describe in the example below.
Example: In the attached image, the number drawn in the centre of the node is its identifier. I assign a vertex property defining the hierarchical level ("lvl") for each node as follows:
node 0; lvl = 0 node 1; lvl = 3 node 2; lvl = 2 node 3; lvl = 1 node 4; lvl = 0
I would like those nodes to be displayed at the same hierarchical level in the image. E.g., nodes 0 and 4 both have lvl=0 and should be drawn at the bottom of the image. Node 1 should stay at the top. http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4026494/dag.png
Note: the last example on the following page seems to show how to use Graphviz to do what I want (although I would like to define the subgraphs based on my lvl vertex property), but I am not sure how to implement this through graph_tool. URL: http://graphs.grevian.org/example
Or, perhaps there is a simpler way of doing what I want to do?
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 19.03.2016 12:30, JHickey wrote:
Graphviz has a "rank" feature that allows nodes in a "subgraph" to be displayed at the same level. I would like to use this (or another feature?) to accomplish what I describe in the example below.
Example: In the attached image, the number drawn in the centre of the node is its identifier. I assign a vertex property defining the hierarchical level ("lvl") for each node as follows:
node 0; lvl = 0 node 1; lvl = 3 node 2; lvl = 2 node 3; lvl = 1 node 4; lvl = 0
I would like those nodes to be displayed at the same hierarchical level in the image. E.g., nodes 0 and 4 both have lvl=0 and should be drawn at the bottom of the image. Node 1 should stay at the top. http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4026494/dag.png
Note: the last example on the following page seems to show how to use Graphviz to do what I want (although I would like to define the subgraphs based on my lvl vertex property), but I am not sure how to implement this through graph_tool. URL: http://graphs.grevian.org/example
Or, perhaps there is a simpler way of doing what I want to do?
I don't think this is possible with graph-tool. Things like graphviz subgraphs and vertex groupings are not supported... The only thing you can do is to set the vertex positions by hand yourself.
Best, Tiago