I have a problem adding vertex labels in a weighted graph working with R.
Graph data frame:
df <- read.table(text=
"From, To, Weight
A,B,1
B,C,2
B,F,3
C,D,5
B,F,4
C,D,6
D,E,7
E,B,8
E,B,9
E,C,10
E,F,11", sep=',',header=TRUE)
and I use:
g<-graph.data.frame(df,directed = TRUE)
plot(g)
to build the following graph:

You can see that the vertex labels (for example) from E to B overlap each other. (The same problem occurs for vertex CD and vertex BF)
I would like to know how to separate these shortcuts so that each different weight on each vertex?
source
share