require(tidygraph)
gr <- create_notable('bull') %>%
activate(edges) %>%
mutate(class = sample(letters[1:3], n(), replace = TRUE))
ggraph(gr, 'stress') +
geom_edge_density(aes(fill = class)) +
geom_edge_link() + geom_node_point()
Run the code above in your browser using DataLab