VennDiagram-内部标签 [英] VennDiagram - internal labels
问题描述
我使用VennDiagram R软件包绘制了基因清单,该图看起来不错./p>
我想在Venn图上添加内部标签,例如,如果数据是由第一和第二组共享的,而不是由第三和第四组共享的,则标签应为1100.我在Venn {gplots}包中发现了一件事使用showSetLogicLabel=TRUE
执行此操作.
我正在完全搜索相同的功能,但使用的是VennDiagram软件包.
就像下面的图片一样,它为图表中的每个计数提供了二进制代码. 我想在VennDiagram包中生成该二进制代码.
http://rgm2.lab.nig.ac. jp/RGM_results/gplots:venn/venn_016_big.png
尝试一下:
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文档(在这里)
I plotted my genelists using the VennDiagram R package, and the diagram looks fine.
I wanted to add internal labels to the Venn diagram like, if data is shared by first and second group but not by the third and fourth group, then the label should be 1100. I found one thing on Venn{gplots} package which uses the showSetLogicLabel=TRUE
to do this.
I am searching exactly for the same functionality, but using the VennDiagram package.
Exactly, like in the below picture, which gives binary codes to every count in the diagram. I wanted to generate that binary codes in the VennDiagram package.
http://rgm2.lab.nig.ac.jp/RGM_results/gplots:venn/venn_016_big.png
Try this:
library(VennDiagram)
draw.triple.venn(65, 75, 85, 35, 15, 25, 5, c("First", "Second", "Third"))
Or this for a nicer view, and 4 groups:
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)
There are plenty of more examples in the VennDiagram Document (Here)
这篇关于VennDiagram-内部标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!