Skip to content
Prev 176342 / 398502 Next

Search for a graph package - see link

G?bor Cs?rdi schrieb:
yes that is what i mean and did with 0 to n-1
but the  item numbers in all other figures are from 1 to n
means: Do I have to calculate by myself that there are 
4 1> 0
2 2 >1
1 2>0
1 1>3
or is there any "switch" to set  the different V(g)$size and E(g)$width
to get the following result:

iigraph_data <-c(1,0, 1,0, 1,0, 1,0, 2,1, 2,0, 2,1, 1,3)
g <- graph( igraph_data,n=max(igraph_data), directed=TRUE )
V(g)$size <- c(40,20,10,10)
E(g)$width <- c(4,4,4,4,2,1,1,1)
E(g)$arrow.size <- 1
plot.igraph(g, layout=layout.kamada.kawai, vertex.label.font=2)


With kind regards Knut