On 06.10.2014 23:18, luistavares wrote:
> Let me get this straight, when I use the "pin" parameter I fix the position
> of the root node, but when I use the layout algorithm the position of other
> nodes end up interfering with the position of the root node at the end. Is
> that what is happening?

No. The actual (absolute) position of the root node remains fixed (you
can check it by inspecting the position value before and after the
layout). But since the other nodes can be placed in any way, their
relative position to the root node (above it, below it, etc) is
arbitrary.

> I wanna fix the place for the root node. For example, it should always
> be located at the bottom of the result.

Again, your are thinking on their relative positions. The layout
algorithm has no idea which side is up, down, etc. The graph_draw()
function just frames and re-scales the nodes using their positions, but
the layout algorithm itself is fully rotational and translational
invariant.

If you want to have some control over their relative positions, you can
pin the root node, and place the other ones initially more or less in
the region you would like them to stay at the end, relative to the root
node. There is no guarantee that they will not move during the layout,
but the probability is higher.

Best,
Tiago

-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to