A network graph made using the Igraph R package.
This is a contribution of Koba Khitalishvili.
If you want to make a network graph from a distance matrix, have a look to graph #7.
The gallery also contains this graph in an interactive mode using d3.js, have a look to graph #87 !
# Create data with the randomNames package :
NUMOFLINKS = 100
relations = data.frame(source = randomNames(1000,which.names='both'), target = "")
relations = relations[rep(seq_len(nrow(relations)), sample(1:10,nrow(relations), replace=T)),]
relations = relations[sample(nrow(relations),NUMOFLINKS),]
relations$target = sample(relations$source,nrow(relations), replace = T)
relations = relations[relations[,1]!=relations[,2], ]
# Have a look to the input table !
## Plot the graph using the IGRAPH package
vertices<-data.frame("name" = unique(unlist(relations))) # node names
g = graph.data.frame(relations, directed=F, vertices=vertices) # raw graph
vertices$group = edge.betweenness.community(g)$membership # betweeness centrality for each node for grouping
#mark.groups=vertices$group, # group vertices by betweeness indicator (redish blob background)
vertex.color = vertices$group, # color vertices by edge betweeness
vertex.label=NA, # no vertex label (name)
Not what you are looking for ? Make a new search !