Igraph package in r: edge labels overlap

I am working with the igraph package in R to visualize network streams.

library(igraph) # Example Data: b <- c("countryA", "countryB", "countryC", "countryA", "countryC", "countryA") c <- c("countryB", "countryC", "countryA", "countryB", "countryA", "countryB") d<- c(100, 200, 200, 300, 400, 200) e <- c(5,12,10,24,25,12) mydata <- data.frame(b,c,d,e) colnames(mydata) <- c("exporteur", "partner", "tradeflow", "price") # Plot in igraph mydata.igraph <- graph.data.frame(mydata) E(mydata.igraph)$label <- mydata[,3] plot(mydata.igraph) 

As you can see, my boundary labels (arrow marks) overlap. How to solve this?

Thanks in advance!

+7
r plot igraph
source share
1 answer

This is the code for this. It uses edgelist instead of igraph, but it's a cooler schedule.

  library(qgraph) qgraph(mydata,edge.labels=T) 

Open this message for more details.

Draw a network in R (thickness of the control edge and non-overlapping edges)

And this help page for using qgraph: http://rgm3.lab.nig.ac.jp/RGM/R_rdfile?f=qgraph/man/qgraph.Rd&d=R_CC

+1
source share

All Articles