我使用VennDiagram R包绘制了我的基因列表,图表看起来很好。
我想在维恩图中添加内部标签,如果数据由第一组和第二组共享,而不是由第三组和第四组共享,则标签应为1100.我在Venn {gplots}包中找到了一件事它使用showSetLogicLabel=TRUE
来执行此操作。
我正在寻找相同的功能,但使用的是VennDiagram包。
正如下图所示,它为图中的每个计数提供二进制代码。 我想在VennDiagram包中生成二进制代码。
http://rgm2.lab.nig.ac.jp/RGM_results/gplots:venn/venn_016_big.png
答案 0 :(得分:7)
试试这个:
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)