I guess this is because igraph rescales the coordinates to c(-1,1), both
vertically and horizontally, so if the short (=high weight) edge happens to
be close to vertical/horizontal, then it is rescaled, and will get longer.

You can use the raw coordinates to avoid this, i.e. plot(...,
rescale=FALSE).

Gabor


On Sat, May 18, 2013 at 5:58 PM, Evan Alymers <[email protected]>wrote:

> For laying out a weighted network, the simplest test case seems like a
> (very) isosceles triangle. However, when I plot this, sometimes it
> looks isosceles and sometimes it looks equilateral. Is there a better
> layout to use?
>
> Thank you
>
> *s = matrix(0, nrow=3, ncol=3)*
> *s[1,2] = 0.2*
> *s[1,3] = 0.2*
> *s[2,3] = 20*
> *s = s + t(s)*
> *
> *
> *g = graph.adjacency(s, mode="undirected", weighted=TRUE, diag=FALSE)*
> *plot(g)*
> *
> *
> *l = layout.drl(g, weights=E(g)$weight)*
> *plot(g, layout=l)*
> *
> *
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>


-- 
Gabor Csardi <[email protected]>     MTA KFKI RMKI
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to