[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] representation large networks with edge and nodes features

From: Leonardo Mazzoni
Subject: [igraph] representation large networks with edge and nodes features
Date: Fri, 01 Jun 2018 11:40:56 +0200
User-agent: webmail UniFI

Hi everybody,
I need to represent a large matrix with the following features.
It is a symmetric 562x562 matrix composed by decimal values that goes from 0 to 1 and I would like to represent its maximum spanning tree (with the function mst, weighting for the negative values) with the following features:

1) assign quantitative attributes to nodes, shaping their size (setting a scale) and creating the correspondent legend 2) assign qualitative attributes to nodes, defining their colour (setting correspondent category) and creating the correspondent legend

Then, the representation of my networks should be like these:
a) represent first a graph with the chacateristics of point 1 and 2 with the edge values (that go from 0 to 1) with only the values bigger than a certain threshold of relationship (e.g. bigger than 0.3); b) represent a second graph with the chacateristics of point 1 and 2 with all the edge values, assigning diverse colours to diverse level of intensity of the relationship (from 0.1 to 0.2, from 0.2 to 0.3,etc..).

I tried to do something, but I stopped, looking at the incomprehensible graph that I produced..
I forward my first attempt to do it with i-graph:

g <- graph_from_adjacency_matrix(foo, mode = "upper", weighted = T, diag = F)
max_spann_tree <- mst(g, weights = -E(g)$weight)
plot.igraph(max_spann_tree,vertex.label=V(net)$name, vertex.attibutes=V(net), edge.color="grey",vertex.color="red",edge.attributes=E(g)$weight,layout=layout.spring)

Any suggestions to do it in igraph?
In the attachment there is a picture of the Product Space by Hidalgo et al. (2007), that is more or less the picture I would like to get.

Many thanks in advance!


Attachment: TheProductSpace.png
Description: PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]