Here is what I would try. Combine the two networks in one, and combine the
edge labels as well, separated by a \n newline character (probably \\n in
R, actually). Then the edge labels will not be on top of each other.

I am not sure what you can do with multiple edges at this point, because
although they might be curved, edge labels are not positioned properly if
they are curved. What you could try is plotting the edges with transparency
in two different colors, maybe also with different width, and then color
the corresponding labels accordingly.This might look good enough.

The final solution would be to have better edge label positions in igraph,
it is on our todo list.

Best,
Gabor


On Tue, Feb 12, 2013 at 6:11 AM, [email protected] <
[email protected]> wrote:

> Hi,
>
> I have two symmetric matrices with the same dimensions and names of rows
> and columns, representing two networks.
> When there is zero, there is no link, otherwise value indicates link with
> given weight (strength).
>
> I would like to visualize these two networks on the same plot, because
> nodes have the same names, they should be combined, but it should be
> possible to display multiple edges with not overlapping labels (weights).
> It should be possible to distinguish weights and edges from which network
> they come from.
>
> As an example I made this simple code
>
>
> A1 = matrix(rep(0,4*4),ncol=4)
> dimnames(A1) = dimnames(A2) = list(letters[1:4],letters[1:4])
> A1['c','d'] = A1['d','c'] = rnorm(1)
> A1['d','b'] = A1['b','d'] = rnorm(1)
> A1['b','a'] = A1['a','b'] = rnorm(1)
> igraph.options(print.edge.attributes=T)
> g1 = graph.adjacency(A1,mode='undirected',weighted=T)
> E(g1)$label = round(E(g1)$weight,3)
> plot(g1)
>
> A2 = A1
> A2['c','b'] = A2['b','c'] = rnorm(1)
> g2 = graph.adjacency(A2,mode='undirected',weighted=T)
> E(g2)$label = round(E(g2)$weight,3)
> plot(g2)
>
> So basically we have g1 and g2, which I want to plot together, but the
> edges in g1 and g2 should be treated as multiple edges in new graph with
> different colors, and also non-overlapping weights as labels (also colored).
>
> Can you help me to solve this ? How to make such a plot ?
>
> Thanks,
> Mateusz
>
> _______________________________________________
> 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