找回密码
 注册
查看: 3085|回复: 0

R语言 VennDiagram包 draw.pairwise.venn()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 15:19:58 | 显示全部楼层 |阅读模式
draw.pairwise.venn(VennDiagram)
draw.pairwise.venn()所属R语言包:VennDiagram

                                        Draw a Venn Diagram with Two Sets
                                         画一个维恩图有两套

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Creates a Venn diagram with two sets.  Creates Euler diagrams when the dataset meets certain conditions.
创建一个维恩图有两套。创建欧拉图的数据集时,满足一定的条件。


用法----------Usage----------


draw.pairwise.venn(area1, area2, cross.area, category = rep("", 2), euler.d = TRUE, scaled = TRUE, inverted = FALSE, ext.text = TRUE,
lwd = rep(2, 2), lty = rep("solid", 2), col = rep("black", 2), fill = NULL, alpha = rep(0.5, 2), label.col = rep("black", 3), cex = rep(1, 3),
fontface = rep("plain", 3), fontfamily = rep("serif", 3), cat.pos = c(-50, 50), cat.dist = rep(0.025, 2), cat.cex = rep(1, 2),
cat.col = rep("black", 2), cat.fontface = rep("plain", 2), cat.fontfamily = rep("serif", 2), cat.just = rep(list(c(0.5, 0.5)), 2),
cat.default.pos = "outer", cat.prompts = FALSE, ext.pos = rep(0, 2), ext.dist = rep(0, 2), ext.line.lty = "solid", ext.length = rep(0.95, 2),
ext.line.lwd = 1, rotation.degree = 0, rotation.centre = c(0.5, 0.5), ind = TRUE, sep.dist = 0.05, offset = 0, ...)



参数----------Arguments----------

参数:area1
The size of the first set
所述第一组的大小


参数:area2
The size of the second set
第二组的大小


参数:cross.area
The size of the intersection between the sets
套之间的交点的尺寸


参数:category
A vector (length 2) of strings giving the category names of the sets
一个向量(长度2)给套的类别名称的字符串


参数:euler.d
Boolean indicating whether to draw Euler diagrams when conditions are met or not
布尔值,指示是否绘制欧拉图当条件符合或不


参数:scaled
Boolean indicating whether to scale circle sizes in the diagram according to set sizes or not
布尔值,指示是否缩放图中的圆圈的大小根据大小与否


参数:inverted
Boolean indicating whether the diagram should be mirrored long the vertical axis or not
布尔值,表示图中是否应镜像长的垂直轴或不


参数:ext.text
Boolean indicating whether to place area labels outside the circles in case of small partial areas or not
布尔值,指示是否将区域外的标签情况下,小部分区域的圈子里,或不


参数:lwd
A vector (length 2) of numbers giving the lwd of the circles' circumferences
一个向量(长度2)数字给lwd的圆的周长


参数:lty
A vector (length 2) giving the lty of the circles' circumferences
给lty的圆的周长的一个向量(长度2)


参数:col
A vector (length 2) giving the colours of the circles' circumferences
提供的颜色的圆的周长的一个向量(长度2)


参数:fill
A vector (length 2) giving the colours of the circles' areas
一个向量(长度2)给圈“区域的颜色


参数:alpha
A vector (length 2) giving the alpha transparency of the circles' areas
一个向量(长度2)圈“区域的Alpha透明度


参数:label.col
A vector (length 3) giving the colours of the areas' labels
一个向量(长度3)提供领域的标签的颜色


参数:cex
A vector (length 3) giving the cex of the areas' labels
一个向量(长度3)给cex的标签


参数:fontface
A vector (length 3) giving the fontface of the areas' labels
一个向量(长度3)给fontface的标签


参数:fontfamily
A vector (length 3) givibg the fontfamily of the areas' labels
一个向量(长度3)givibg fontfamily的标签


参数:cat.pos
A vector (length 2) giving the positions (in degrees) of the category names along the circles, with 0 (default) at the 12 o'clock location
一个向量(长度2)的位置(度),沿界的类别名称,在12点钟位置为0(默认)


参数:cat.dist
A vector (length 2) giving the distances (in npc units) of the category names from the edges of the circles (can be negative)
给出的距离(全国人大单位)从边缘的圆的类别名称(甲向量(长度为2)可以为负)


参数:cat.cex
A vector (length 2) giving the cex of the category names
一个向量给cex的类别名称(长度2)


参数:cat.col
A vector (length 2) giving the colours of the category names
的向量(长度为2)发出的类别名称的颜色


参数:cat.fontface
A vector (length 2) giving the fontface of the category names
一个向量给fontface的类别名称(长度2)


参数:cat.fontfamily
A vector (length 2) giving the fontfamily of the category names
一个向量给fontfamily的类别名称(长度2)


参数:cat.just
List of 2 vectors of length 2 indicating horizontal and vertical justification of each category name
2个向量的长度为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)
布尔值,指示是否显示帮助文字定位或类别名称)


参数:ext.pos
A vector (length 1 or 2) giving the positions (in degrees) of the external area labels along the circles, with 0 (default) at the 12 o'clock location
一个向量(长度为1或2)的位置(度)沿圆外部区域的标签,在12点钟位置为0(默认)


参数:ext.dist
A vector (length 1 or 2) giving how far to place the external area labels relative to its anchor point
多远放置相对于它的锚点的外部区域标签的向量(长度为1或2),得到


参数:ext.line.lty
A vector (length 1 or 2) giving the lty of the lines connecting the external area labels to their anchor points
甲矢量(长度为1或2)给予lty线连接的外部区域标签锚点


参数:ext.length
A vector (length 1 or 2) giving the proportion of the lines connecting the external area labels to their anchor points actually drawn
(长度为1或2),得到的向量的比例的线,其锚定连接的外部区域标签指向实际画


参数:ext.line.lwd
A vector (length 1 or 2) giving the lwd of the lines connecting the external area labels to their anchor points
甲矢量(长度为1或2)给予lwd线连接的外部区域标签锚点


参数: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对象,或不


参数:sep.dist
Number giving the distance between circles in case of an Euler diagram showing mutually exclusive sets
号码各界之间的距离的情况下欧拉图互相排斥的集合


参数:offset
Number between 0 and 1 giving the amount of offset from the centre in case of an Euler diagram showing inclusive sets
介于0和1之间的数,给从箱子欧拉示示出包容性的集的中心的偏移量


参数:...
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----------

Euler diagrams are drawn for mutually exclusive sets (cross.area == 0), inclusive sets (area1 == 0 or area2 == 0), and coincidental sets (area1 == 0 and area2 == 0) if euler.d == TRUE. The function defaults to placing the larger set on the left.  The function also defaults to giving the first element of each argument to the larger set.  inverted or rotation.degree can be used to reverse this.
欧拉图的绘制相互排斥的集合(cross.area == 0),包括套(area1 == 0或area2 == 0)和的巧合台(area1 == 0和area2 == 0)如果<所述>。功能默认将设置在左侧的功能也默认为每个参数的第一个元素的大量“euler.d == TRUE或inverted可以用来扭转这种。


值----------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 two-set diagram[简单的两集图]
venn.plot <- draw.pairwise.venn(100, 70, 30, c("First", "Second"));

# Same diagram as above, but without scaling[如上图,但不进行缩放]
venn.plot <- draw.pairwise.venn(100, 70, 30, c("First", "Second"), scaled = FALSE);

# A more complicated diagram Demonstrating external area labels[一个更复杂的图表演示外部区域标签]
venn.plot <- draw.pairwise.venn(
        area1 = 100,
        area2 = 70,
        cross.area = 68,
        category = c("First", "Second"),
        fill = c("blue", "red"),
        lty = "blank",
        cex = 2,
        cat.cex = 2,
        cat.pos = c(285, 105),
        cat.dist = 0.09,
        cat.just = list(c(-1, -1), c(1, 1)),
        ext.pos = 30,
        ext.dist = -0.05,
        ext.length = 0.85,
        ext.line.lwd = 2,
        ext.line.lty = "dashed"
        );

# Demonstrating an Euler diagram[展示的欧拉图]
venn.plot <- draw.pairwise.venn(
        area1 = 100,
        area2 = 70,
        cross.area = 0,
        category = c("First", "Second"),
        cat.pos = c(0, 180),
        euler.d = TRUE,
        sep.dist = 0.03,
        rotation.degree = 45
        );

# Writing to file[写入文件]
tiff(filename = "Single-set Venn diagram.tiff", compression = "lzw");
       
venn.plot <- draw.pairwise.venn(100, 70, 30, c("First", "Second"));

grid.draw(venn.plot);

dev.off();

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-27 00:32 , Processed in 0.033391 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表