I want to plot an adjacent matrix with ggraph. My data looks like this
set.seed(43);
check <- matrix(rnorm(10), nrow = 5,ncol = 4, dimnames = list(c("AL","CH","CZ","DN","SC"), c("GR","EN","GE","FR")))
GR EN GE FR
AL -0.03751376 -0.27743280 -0.03751376 -0.27743280
CH -1.57460441 0.38643441 -1.57460441 0.38643441
CZ -0.48596752 -0.06040412 -0.48596752 -0.06040412
DN 0.46518623 -0.68617976 0.46518623 -0.68617976
SC -0.90409807 -1.90613679 -0.90409807 -1.90613679
I want to plot interactions using a bipartite network but I find it hard to specify the labels at the x-axis at the top and the bottom. Also I want to change the shape of the nodes. I want to see a blue square on the top and a green circle at the bottom.
ggraph(check, layout = "bipartite") +
geom_edge_link0(aes(edge_width = weight),edge_colour = "grey66") +
geom_node_point()
Any help or comment are highly appreciated.