draw.quad.venn(VennDiagram)
draw.quad.venn()所属R语言包:VennDiagram
Draw a Venn Diagram with Four Sets
画一个维恩图四组
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates a Venn diagram with four sets.
创建一个维恩图,有四套。
用法----------Usage----------
draw.quad.venn(area1, area2, area3, area4, n12, n13, n14, n23, n24, n34, n123, n124, n134, n234, n1234, category = rep("", 4), lwd = rep(2, 4),
lty = rep("solid", 4), col = rep("black", 4), fill = NULL, alpha = rep(0.5, 4), label.col = rep("black", 15), cex = rep(1, 15), fontface = rep("plain", 15),
fontfamily = rep("serif", 15), cat.pos = c(-15, 15, 0, 0), cat.dist = c(0.22, 0.22, 0.11, 0.11), cat.col = rep("black", 4), cat.cex = rep(1, 4),
cat.fontface = rep("plain", 4), cat.fontfamily = rep("serif", 4), cat.just = rep(list(c(0.5, 0.5)), 4), cat.default.pos = "outer", cat.prompts = FALSE,
rotation.degree = 0, rotation.centre = c(0.5, 0.5), ind = TRUE, ...)
参数----------Arguments----------
参数:area1
The size of the first set
所述第一组的大小
参数:area2
The size of the second set
第二组的大小
参数:area3
The size of the third set
的第三组的大小
参数:area4
The size of the four set
四个设定的大小
参数:n12
The size of the intersection between the first and the second set
的交点之间的第一和第二组的大小
参数:n13
The size of the intersection between the first and the third set
第一和第三组的大小之间的交点
参数:n14
The size of the intersection between the first and the fourth set
的交点之间的第一和第四组的大小
参数:n23
The size of the intersection between the second and the third set
之间的交叉点的第二和第三组的大小
参数:n24
The size of the intersection between the second and the fourth set
之间的交叉点的第二和第四组的大小
参数:n34
The size of the intersection between the third and the fourth set
的交点之间的第三和第四组的大小
参数:n123
The size of the intersection between the first, second and third sets
的大小之间的交叉点的第一,第二和第三组
参数:n124
The size of the intersection between the first, second and fourth sets
的交点之间的第一,第二和第四组的大小
参数:n134
The size of the intersection between the first, third and fourth sets
的第一,第三和第四组的大小之间的交点
参数:n234
The size of the intersection between the second, third and fourth sets
所述第二,第三和第四组的大小之间的交点
参数:n1234
The size of the intersection between all four sets
所有四组的大小之间的交点
参数:category
A vector (length 4) of strings giving the category names of the sets
字符串甲向量(长度为4)发出的集的类别名称
参数:lwd
A vector (length 4) of numbers giving the lwd of the circles' circumferences
一个向量(长度为4)的数字给lwd的圆的周长
参数:lty
A vector (length 4) giving the lty of the circles' circumferences
给lty的圆的周长的一个向量(长度4)
参数:col
A vector (length 4) giving the colours of the circles' circumferences
一个向量(长度为4)提供的颜色的圆的周长
参数:fill
A vector (length 4) giving the colours of the circles' areas
一个向量(长度4)给圈“区域的颜色
参数:alpha
A vector (length 4) giving the alpha transparency of the circles' areas
圈“区域的Alpha透明度的一个向量(长度为4)
参数:label.col
A vector (length 15) giving the colours of the areas' labels
一个向量(长度为15)提供领域的标签的颜色
参数:cex
A vector (length 15) giving the cex of the areas' labels
一个向量(长度为15),给cex的标签
参数:fontface
A vector (length 15) giving the fontface of the areas' labels
一个向量(长度为15),给fontface的标签
参数:fontfamily
A vector (length 15) givibg the fontfamily of the areas' labels
一个向量(长度15)givibg fontfamily的领域“标签
参数:cat.pos
A vector (length 4) giving the positions (in degrees) of the category names along the circles, with 0 (default) at the 12 o'clock location
一个向量(长度4)的位置(度),沿界的类别名称,在12点钟位置为0(默认)
参数:cat.dist
A vector (length 4) giving the distances (in npc units) of the category names from the edges of the circles (can be negative)
甲向量(长度为4),给出的距离(全国人大单位)从边缘的圆的类别名称(可以为负)
参数:cat.cex
A vector (length 4) giving the cex of the category names
一个向量给cex的类别名称(长度为4)
参数:cat.col
A vector (length 4) giving the colours of the category names
的向量(长度为4)发出的类别名称的颜色
参数:cat.fontface
A vector (length 4) giving the fontface of the category names
一个向量给fontface的类别名称(长度为4)
参数:cat.fontfamily
A vector (length 4) giving the fontfamily of the category names
一个向量给fontfamily的类别名称(长度为4)
参数:cat.just
List of 4 vectors of length 2 indicating horizontal and vertical justification of each category name
4向量的长度为2,表示水平和垂直对齐每个类别名称列表
参数:cat.default.pos
Either 'outer' or 'text' to specify the default location of category names (cat.pos and cat.dist are handled differently)
无论是“外部”或“文本”指定的默认位置类别名称(cat.pos和cat.dist的处理方式不同)
参数:cat.prompts
Boolean indicating whether to display help text on category name positioning or not)
布尔值,指示是否显示帮助文字定位或类别名称)
参数:rotation.degree
Number of degrees to rotate the entire diagram
数度旋转整个图
参数:rotation.centre
A vector (length 2) indicating (x,y) of the rotation centre
(长度为2)表示的向量(的x,y)的旋转中心
参数:ind
Boolean indicating whether the function is to automatically draw the diagram before returning the gList object or not
布尔值,指示函数是否是自动绘制图前返回的glist对象,或不
参数:...
Additional arguments to be passed to or from other methods, including margin, which indicates amount of whitespace around the final diagram in npc units
其他参数被传递到或从其他方法,包括margin,这表明周围的空白量在全国人民代表大会单元的最终图
Details
详细信息----------Details----------
The function defaults to placing the ellipses so that area1 corresponds to lower left, area2 corresponds to lower right, area3 corresponds to middle left and area4 corresponds to middle right.
该功能默认为椭圆形,使区1对应的左下方,区域2对应到右下,AREA3对应到中央的左边和区4对应的中间偏右的。
值----------Value----------
Returns an object of class gList containing the grid objects that make up the diagram. Also displays the diagram in a graphical device unless specified with ind = FALSE. Grid::grid.draw can be used to draw the gList object in a graphical device.
返回一个对象,包含网格对象,使图中的类glist了。图中还显示一个图形化的设备,除非指定的IND = FALSE。可用于网格:: grid.draw,在图形设备到得出的glist的对象。
(作者)----------Author(s)----------
Hanbo Chen
实例----------Examples----------
# A simple four-set diagram[一个简单的四集图]
venn.plot <- draw.quad.venn(315, 495, 330, 370, 145, 85, 105, 130, 95, 75, 50, 45, 30, 35, 5, c("First", "Second", "Third", "Fourth"));
# A more complicated diagram[一个更复杂的图]
venn.plot <- draw.quad.venn(
area1 = 315,
area2 = 495,
area3 = 330,
area4 = 370,
n12 = 145,
n13 = 85,
n14 = 105,
n23 = 130,
n24 = 95,
n34 = 75,
n123 = 50,
n124 = 45,
n134 = 30,
n234 = 35,
n1234 = 5,
category = c("First", "Second", "Third", "Fourth"),
fill = c("orange", "red", "green", "blue"),
lty = "dashed",
cex = 2,
cat.cex = 2,
cat.col = c("orange", "red", "green", "blue")
);
# Writing to file[写入文件]
tiff(filename = "Single-set Venn diagram.tiff", compression = "lzw");
venn.plot <- draw.quad.venn(315, 495, 330, 370, 145, 85, 105, 130, 95, 75, 50, 45, 30, 35, 5, c("First", "Second", "Third", "Fourth"));
grid.draw(venn.plot);
dev.off();
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|