I'm puzzled about facetting a graph in R ggraph package
library(tidyverse)
library(ggraph)
library(igraph)
set.seed(100)
yr=c(2013,2014,2015,2016)
x=data.frame(from=LETTERS[sample(26,100,replace = T)],
to=paste0(letters[sample(26,100,replace = T)],'a'),
year=sample(yr,100,replace = T))
graph <- graph_from_data_frame(x)
graph%>%ggraph(layout = 'kk') +
geom_edge_fan(show.legend = FALSE) +
geom_node_point() +
facet_edges(~year)
Why the faceted graph show unlink points when all vertices are connected to some other vertice? and how can i use different shape to represent from and to vertices? How can I add text label to the graph - I tried geom_node_point(aes(labels = V(graph)$name)) and that didn't work well.
thanks