‘ggVennDiagram
’ enables fancy Venn plot with 2-7 sets
and generates publication quality figure.
You can install the released version of ggVennDiagram from CRAN with:
And the development version from GitHub with:
Generate example data.
If you use long category names in Venn plot, labels may be cropped by plot borders. To avoid this, just use a ggplot trick to expand x axis.
p1 <- ggVennDiagram(gene_list,
category.names = c("a very long name","short name","name","another name"))
p1
When intersection values only have several members,
ggVennDiagram
is efficient to show the values in
places.
ggVennDiagram(gene_list, label = "count")
ggVennDiagram(gene_list, label = "percent")
ggVennDiagram(gene_list, label = "both")
ggVennDiagram(gene_list, label = "none")
geom_text()