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

Reply via email to