library(ggVennDiagram)
#> Warning: package 'ggVennDiagram' was built under R version 4.2.3
genes <- paste("gene",1:1000,sep="")
set.seed(20210419)
x <- list(A=sample(genes,300),
B=sample(genes,525),
C=sample(genes,440),
D=sample(genes,440),
E=sample(genes,440),
F=sample(genes,150),
G=sample(genes,300)
)
ggVennDiagram(x,
#set_color = c("blue","red","yellow","black"), # 集合名字颜色
set_size = 6,# 集合名字大小
label = "count", # "count","percent","both","none"
label_geom = "label", # label/text,
label_alpha = 0, # label背景色
label_color = "black",
label_percent_digit = 2, # 保留几位小数
edge_lty = "solid", # 边框线型,solid,dashed
edge_size = 1.2 # 边框粗细
)+scale_fill_gradient(low="#ffffb2",high = "#b10026")+ # 填充色
scale_color_brewer(palette = "Set1" )# 边框色,貌似不能变为无边框
#准备韦恩图数据列表,一列为一组ID data<-read.table("data.txt",header=T,check.names = F,stringsAsFactors = F,sep="\t",fill=T,na.string="") x<-as.list(data) x<-lapply(x,na.omit)
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!