試試這個:
library(VennDiagram)
draw.triple.venn(65, 75, 85, 35, 15, 25, 5, c("First", "Second", "Third"))
或者,這對於一個更好的看法,以及4組:
A <- sample(1:1000, 400, replace = FALSE);
B <- sample(1:1000, 600, replace = FALSE);
C <- sample(1:1000, 350, replace = FALSE);
D <- sample(1:1000, 550, replace = FALSE);
E <- sample(1:1000, 375, replace = FALSE);
venn.diagram(x = list(A = A,D = D,B = B,C = C), filename = "Venn.tiff",
col = "transparent", fill = c("cornflowerblue","green","yellow","darkorchid1"),
alpha = 0.50, label.col = c("orange", "white", "darkorchid4", "white", "white",
"white", "white", "white", "darkblue", "white", "white", "white", "white",
"darkgreen", "white"), cex = 1.5, fontfamily = "serif", fontface = "bold",
cat.col = c("darkblue", "darkgreen", "orange", "darkorchid4"), cat.cex = 1.5,
cat.pos = 0, cat.dist = 0.07, cat.fontfamily = "serif", rotation.degree = 270,
margin = 0.2)
VennDiagram文檔中有很多示例(Here)
歡迎使用堆棧溢出!我已經對你進行了一些編輯提問,希望能讓它更清楚。 –
@ user1732190請您添加一些示例代碼嗎?它將大大幫助 – Ali
venn.diagram(列表(A = a1,B = a2,C = a3,D = a4), filename =「all_interactions.tiff」, category = c(「x5x9」,「x6x10」 「x5x6」,「x9x10」), lwd = c(0.5:4), fill = c(「blue」,「red」,「green」,「pink」), cex = 2, cat.cex = 2, cat.dist = 0.09, ext.pos = 30, ext.dist = -0.05, ext.length = 0.85, ext.line.lwd = 2, ext.line.lty =「虛線「, main =」X [i]> 10 and qvalue <= 0.01「, main.cex = 1, main.col =」gray「) – user1732190