EDIT 내 코드가 무엇이 잘못되었는지 알아 내려고하고 간단한 그래프를 그려 작은 그래프에서 화살표가 어떻게 보이는지 알기 시작했습니다. 나는 다음 명령을 피곤했다.igraph를 사용하여 네트워크를 그릴 때 큰 화살촉 머리
g2 <- graph(edges=c(1,2, 2,3, 3, 1), n=10)
plot(g2)
그리고 내 그래프는 이다. 따라서 문제는 내 코드가 아니라 igraph 또는 R과 함께 있다고 생각합니다. igraph와 R을 다시 설치했지만 문제가 해결되지 않았습니다. 이 문제로 연결되는 패키지 충돌이있을 수 있습니까? 내가 네트워크의 플롯을 생성하기 위해 노력하고
[1] "base" "boot" "class" "cluster"
[5] "codetools" "colorspace" "compiler" "datasets"
[9] "dichromat" "digest" "doParallel" "foreach"
[13] "foreign" "graphics" "grDevices" "grid"
[17] "gridBase" "gtable" "igraph" "irlba"
[21] "iterators" "KernSmooth" "labeling" "lattice"
[25] "lazyeval" "magrittr" "MASS" "Matrix"
[29] "methods" "mgcv" "munsell" "nlme"
[33] "NMF" "nnet" "parallel" "pkgmaker"
[37] "plyr" "RColorBrewer" "Rcpp" "registry"
[41] "reshape2" "rngtools" "rpart" "scales"
[45] "spatial" "splines" "stats" "stats4"
[49] "stringi" "stringr" "survival" "tcltk"
[53] "tibble" "tools" "utils" "xtable"
어떤 이유로 나는 내 화살촉 작은 사각형 대신 일반적인 삼각형 화살촉 모양 : 여기에 내가 설치 한이 패키지의 조명된다. 여기
내가 내 플롯을 위해 사용하고있는 코드입니다 :toy.edges <- na.omit(read.csv("Data/Edge_list-toy.csv", header = TRUE, colClasses = "numeric", na.strings = c("NA", "", "#N/A")))
toy.nodes <- na.omit(read.csv("Data/NodesDataF-toy.csv", header = TRUE, na.strings = c("NA", "", "#N/A")))
toy.graph <- graph_from_data_frame(toy.edges, directed = TRUE, vertices = toy.nodes)
V(toy.graph)$color <- "magenta"
V(toy.graph)$shape <- "sphere"
V(toy.graph)$size <- 3*15^(ifelse(is.na(V(toy.graph)$node.size), 0.001,
V(toy.graph)$node.size))
plot(toy.graph, layout = layout.fruchterman.reingold(toy.graph),
vertex.label=NA, edge.width=E(toy.graph)$weight,
edge.arrow.size=0.005, edge.arrow.width=0.0000001)
그리고 여기 예제 플롯이다 : 나는 edge.arrow.size
을위한 약간 더 큰 값을 가질 때
그것은 더 악화 보인다 및 edge.arrow.width
.
내 코드가 잘못되었습니다. 그것은 R의 버전과 관련이있을 수 있습니까? 나는 아주 비슷한 명령을 사용하여 1 톤의 플롯을 만들었으며 결코 문제가 없었습니다.
여기에 nodes info 및 edge list 인 파일이 있습니다.