I’m currently working with igraph and have colour labelled my vertices. I would like to add a legend Indicating what each colour represents.
What I can think of at this point is to use ggplot2 to print only the legend and hide a bar plot.
Is there a way to just output the legend?
Here are 2 approaches:
Set Up Plot
Cowplot approach
Home grown approach
Shamelessly stolen from: Inserting a table under the legend in a ggplot2 histogram
Created on 2018-05-31 by the reprex package (v0.2.0).