Closed crebli closed 1 year ago
hi, Like this,how to neatly remove the useless 0 from the image?
在 2023-03-27 09:10:15,"Chun-Hui Gao" @.***> 写道:
see: https://gaospecial.github.io/ggVennDiagram/articles/using-ggVennDiagram.html
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
我看不到图片。
Like this. Many useless 0s make the image untidy. It's usefult to remove all of these 0 by a certain setting in the package.
Like this. Many useless 0s make the image untidy. It's usefult to remove all of these 0 by a certain setting in the package.
see this: https://gaospecial.github.io/ggVennDiagram/articles/fully-customed.html
geom_sf_text(aes(label = count), fontface = "bold", data = venn_setlabel(data) %>% filter(count != 0)) +
Nice!
Sorry! A small error with your newly added code: ggplot() +
geom_sf(aes(fill = count), data = venn_region(data)) +
geom_sf(aes(color = id), data = venn_setedge(data), show.legend = FALSE) +
geom_sf_text(aes(label = count), fontface = "bold", data = venn_setlabel(data) %>% filter(count!= 0)) +
geom_sf_label(aes(label = count), data = venn_region(data)) + theme_void()
Error in stopifnot()
:
i In argument: count != 0
.
Caused by error in count != 0
:
! comparison (2) is possible only for atomic and list types
stopifnot()
:
i In argument: count != 0
.
Caused by error in count != 0
:
! comparison (2) is possible only for atomic and list typesBacktrace:
Thanks for your feedback.
Corrected a mistake.
genes <- paste0("gene",1:20)
set.seed(20230406)
gene_list <- list(A = sample(genes,5),
B = sample(genes,5),
C = sample(genes,5),
D = sample(genes,5),
E = sample(genes,5),
F = sample(genes,5),
G = sample(genes,5))
library(ggVennDiagram)
library(ggplot2)
library(dplyr)
venn <- Venn(gene_list)
data <- process_data(venn)
ggplot() +
# 1. region count layer
geom_sf(aes(fill = count), data = venn_region(data)) +
# 2. set edge layer
geom_sf(aes(color = id), data = venn_setedge(data), show.legend = FALSE) +
# 3. set label layer
geom_sf_text(aes(label = name), data = venn_setlabel(data)) +
# 4. region label layer
geom_sf_label(aes(label = count), data = venn_region(data) %>% filter(count != 0), alpha = 0.5) +
theme_void()
Nice. Thank you!
At 2023-04-06 10:31:41, "Chun-Hui Gao" @.***> wrote:
Thanks for your feedback.
Corrected a mistake.
genes<- paste0("gene",1:1000) set.seed(20210302) gene_list<-list(A= sample(genes,100), B= sample(genes,200), C= sample(genes,300), D= sample(genes,200))
library(ggVennDiagram) library(ggplot2) library(dplyr) venn<- Venn(gene_list) data<- process_data(venn) ggplot() +# 1. region count layer geom_sf(aes(fill=count), data= venn_region(data)) +# 2. set edge layer geom_sf(aes(color=id), data= venn_setedge(data), show.legend=FALSE) +# 3. set label layer geom_sf_text(aes(label=name), data= venn_setlabel(data)) +# 4. region label layer geom_sf_label(aes(label=count), data= venn_region(data) %>% filter(count>10)) + theme_void()
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Hi, A question with the ggVennDiagram is that all empty cells can be regarded as one cell in the column with less rows. For example, A: 60 items, B: 50 items, C: 40 items. We'll get A: 60, B:51, C:41 items after ploting as below. Please check it and find a resolution for this quetion during data input.
在 2023-05-11 21:35:27,"Chun-Hui Gao" @.***> 写道:
Closed #50 as completed.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Hi, A question with the ggVennDiagram is that all empty cells can be regarded as one cell in the column with less rows. For example, A: 60 items, B: 50 items, C: 40 items. We'll get A: 60, B:51, C:41 items after ploting as below. Please check it and find a resolution for this quetion during data input. 在 2023-05-11 21:35:27,"Chun-Hui Gao" @.> 写道: Closed #50 as completed. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>
Please give a reproducible example and open an extra issue to ask.
hi, two much 0s were found in it, how to discard these digits from the venn image?