What are the differences between community detection algorithms in igraph?

Here is a short summary about the community detection algorithms currently implemented in igraph: edge.betweenness.community is a hierarchical decomposition process where edges are removed in the decreasing order of their edge betweenness scores (i.e. the number of shortest paths that pass through a given edge). This is motivated by the fact that edges connecting different … Read more

How to plot just the legends in ggplot2?

Here are 2 approaches: Set Up Plot library(ggplot2) library(grid) library(gridExtra) my_hist <- ggplot(diamonds, aes(clarity, fill = cut)) + geom_bar() Cowplot approach # Using the cowplot package legend <- cowplot::get_legend(my_hist) grid.newpage() grid.draw(legend) Home grown approach Shamelessly stolen from: Inserting a table under the legend in a ggplot2 histogram ## Function to extract legend g_legend <- function(a.gplot){ … Read more