我正在嘗試制作 EDA 歷史的系譜圖,用Institution博士學位的邊緣和箭頭著色。這類作品,但圖中的實心箭頭在圖例中顯示為空心。有什么方法可以得到我想要的嗎?
這是我的 MWE:
library(readxl) # Read Excel Files
library(dplyr) # A Grammar of Data Manipulation
library(here) # A Simpler Way to Find Your Files
library(ggraph) # An Implementation of Grammar of Graphics for Graphs and Networks
library(igraph) # Network Analysis and Visualization
EDA_geneaology <- read_excel(here("EDA-geneaology.xlsx"))
EDA_gen <- EDA_geneaology %>%
rename(parent = advisor,
child = student,
Institution = institution)
#' Clean up some links not to be shown
EDA_gen <- EDA_gen %>%
mutate(main = (child %in% c("John Tukey", "Harold Gulliksen")) ) %>%
filter( !(parent %in% c("Solomon Lefschetz", "James Angell")) ) %>%
filter( !(child %in% c("Clyde Coombs")))
EDA_graph <- graph_from_data_frame(EDA_gen[,c(1,3,2,4,6)])
ggraph(EDA_graph, layout="kk")
geom_edge_link(aes(color=Institution, fill=Institution),
arrow = grid::arrow(type = "closed",
angle=15,
length = unit(0.15, "inches"))
)
geom_node_point()
geom_node_text(aes(label = name), repel = TRUE)
ggtitle("Specimen of a Chart of Geneaology of EDA")
theme_graph()
theme(legend.position = 'bottom')
這是我的圖表:

編輯
這是資料:作為鏈接:
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/482745.html
