0

我有 200 个国家的特定商品的贸易数据(出口/进口)。例子:

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")

我使用 igraph 包来显示贸易流。

library(igraph)
mydata.igraph <- graph.data.frame(mydata)
plot(mydata.igraph)

我的问题: 1. 如何将价值和价格添加到每个“贸易流箭头”?2. 如何指定价值和价格的选项(字体大小、颜色等)?

提前致谢!

4

0 回答 0