gaospecial / ggVennDiagram

A 'ggplot2' implement of Venn Diagram.
https://gaospecial.github.io/ggVennDiagram/
GNU General Public License v3.0
282 stars 38 forks source link

How to add the intersection Count value at the top of each UPSET plot #63

Closed sfd99 closed 9 months ago

sfd99 commented 9 months ago

**Hi Chun-Hui Gao,

TRULY EXCELLENT PKG!** .

From you Github example, using sets: A, B, C and D.

library(ggVennDiagram)
genes <- paste("gene",1:1000,sep="")
set.seed(20231214)
x <- list(A=sample(genes,300),
          B=sample(genes,525),
          C=sample(genes,440),
          D=sample(genes,350))

Q: How to add the intersection Count values, ( for ex: 94 at B/C ), at the top of each vertical bar of the UPSET plot.

I tried: ggVennDiagram(x[1:4], force_upset = TRUE, order.set.by = "name", order.intersect.by = "size")

which show fine, but the intersection count values are not shown at the top of each vertical bar...

image

How to do that, simply?

Thanks! SFd99 latest R and Rstudio Ubuntu Linux 20.04 ggVennDiagram version: 1.4.13 ( d/l and installed f/GITHUB ). San Francisco.

gaospecial commented 9 months ago

Sorry for the delay of reply. The new dev version should works. Please install with pak::pak("gaospecial/ggVennDiagram") and retry.

see https://github.com/gaospecial/ggVennDiagram/commit/eaf9df973f5019a5908949c31506799e13ba4870

sfd99 commented 9 months ago

Hi Chun-Hui Gao

Super-perfect. Thank you, 10^6 !...