Tree layout

12 views
Skip to first unread message

NiL

unread,
Aug 31, 2010, 11:04:46 AM8/31/10
to cytoscapeweb-discuss
Hello again,

I'm making some progress again.

The data I want to output looks like this :

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:schemaLocation="http://
graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">

<key id="label" for="all" attr.name="label"
attr.type="string"/>
<key id="type" for="all" attr.name="type"
attr.type="string"/>
<graph edgedefault="directed">
<graph>
<node id="0_0">
<data key="label">great grand parent 1</data>
<data key="type">group</data>
</node>
<node id="0_1">
<data key="label">grand parent 1</data>
<data key="type">group</data>
</node>
<node id="0_2">
<data key="label">grand parent 2</data>
<data key="type">group</data>
</node>
<node id="1_1">
<data key="label">parent 1</data>
<data key="type">group</data>
</node>
<node id="1_2">
<data key="label">parent 2</data>
<data key="type">group</data>
</node>
</graph>

<graph>
<node id="2">
<data key="label">myself</data>
<data key="type">group</data>
</node>
</graph>

<graph>
<node id="3_1">
<data key="label">child 1</data>
<data key="type">group</data>
</node>
<node id="3_2">
<data key="label">child 2</data>
<data key="type">group</data>
</node>
<node id="3_3">
<data key="label">administrateur</data>
<data key="type">user</data>
</node>
</graph>

<edge source="0_0" target="0_1"/>
<edge source="0_1" target="1_2"/>
<edge source="0_2" target="1_1"/>
<edge source="1_1" target="2"/>
<edge source="1_2" target="2"/>
<edge source="2" target="3_1"/>
<edge source="2" target="3_2"/>
<edge source="2" target="3_3"/>
</graph>
</graphml>


I display using the "Tree" Layout, but I have a parent and its
associated grand parent *below* the 'middle' node.
I tried using subgraphs but still to no better success

Is there a way to add constraint on the level they should appear ?

tx

Christian Tannus Lopes

unread,
Aug 31, 2010, 1:09:04 PM8/31/10
to cytoscapew...@googlegroups.com
Sorry, but C.Web does not support this kind of level constraint.
The tree layout we have got from Flare is just a rooted tree, so it accepts only one root node and position the other nodes away from the root.
Subgraphs are not supported by C.Web either.

You might need to use another algorithm, as external layout, and use the Preset layout to reposition the nodes in C.Web.
Or you could try to port one to ActionAcript.

Thanks!

Reply all
Reply to author
Forward
0 new messages