if (FALSE) {
library(igraphdata)
data(karate)
karate <- karate %>%
add_layout_(with_kk()) %>%
set_vertex_attr("size", value = 10)
V(karate)$color <- scales::dscale(degree(karate) %>% cut(5), sequential_pal)
plot(karate)
}
Run the code above in your browser using DataLab