How to specify the color of the edge in ggraph plot like this
library(ggraph)
library(igraph)
df_school = highschool %>% mutate(yr=ifelse(year%%2==0,'purple','blue'))
V(graph)$node_label = names(V(graph))
ggraph(graph, layout = 'linear', circular = TRUE) +
geom_edge_arc(aes(colour = factor(year))) +
geom_node_label(aes(label=node_label), alpha=0.2) +
scale_edge_colour_identity()
Here only the edge is colored, but I don't know how to code the nodes or labels, or make the label background semi-transparent. Wondering if anyone can help.