Using 'groups' in call to graph_tool.draw.sfdp_layout()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using 'groups' in call to graph_tool.draw.sfdp_layout()

Kerr Avon
Greetings,

I have been unable to see any effect on the layout when using the 'groups'
argument.

For example, I have tried setting groups equal to a VertexPropertyMap as
follows:

        vprop_layout_groups = self.new_vertex_property("int") # Vertex
groups.

With layout_groups = [0 0 0 0 0 0 1 1 1]
I can see no grouping effect on the positions of the vertices as returned by
sfdp_layout().
The three vertices without edges are in the '1' group. The connected
vertices are in the '0' group.
<https://nabble.skewed.de/file/t496263/sfdp-groups.png>
I have been unable to find any example showing a call to sfdp_layout() where
'groups' is used.
Is there a working example available?

Thank you.

p.s. Is there a way to donate money to the graph-tool project?





--
Sent from: https://nabble.skewed.de/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: Using 'groups' in call to graph_tool.draw.sfdp_layout()

Tiago Peixoto
Administrator
Am 26.09.20 um 13:54 schrieb Kerr Avon:

> Greetings,
>
> I have been unable to see any effect on the layout when using the 'groups'
> argument.
>
> For example, I have tried setting groups equal to a VertexPropertyMap as
> follows:
>
>         vprop_layout_groups = self.new_vertex_property("int") # Vertex
> groups.
>
> With layout_groups = [0 0 0 0 0 0 1 1 1]
> I can see no grouping effect on the positions of the vertices as returned by
> sfdp_layout().
> The three vertices without edges are in the '1' group. The connected
> vertices are in the '0' group.
> <https://nabble.skewed.de/file/t496263/sfdp-groups.png>
> I have been unable to find any example showing a call to sfdp_layout() where
> 'groups' is used.
> Is there a working example available?

You should experiment with the `gamma` parameter which controls the
strength of the attractive force between nodes of the same group.

--
Tiago de Paula Peixoto <[hidden email]>
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
--
Tiago de Paula Peixoto <tiago@skewed.de>