I'm trying to change the shape used in the legend from a square to circle with a fill aesthetic, but none of the override arguments seem to be working.
If:
library(ggraph)
library(igraph)
g <- graph_from_data_frame(highschool)
ggraph(g) +
geom_edge_link(aes(colour = factor(year))) +
geom_node_point() +
geom_edge_density(aes(fill = factor(year)))
Adding:
guides(fill = guide_legend(override.aes = list(shape = c(21, 21))))
Produces this
[
I'm not sure if it's possible to add an extra layer to the ggraph?