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

R语言 sna包 gplot.layout()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 10:52:43 | 显示全部楼层 |阅读模式
gplot.layout(sna)
gplot.layout()所属R语言包:sna

                                         Vertex Layout Functions for gplot
                                         顶点布局的功能gplot

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

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

Various functions which generate vertex layouts for the gplot visualization routine.
生成顶点gplot可视化常规布局的各种功能。


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


gplot.layout.adj(d, layout.par)
gplot.layout.circle(d, layout.par)
gplot.layout.circrand(d, layout.par)
gplot.layout.eigen(d, layout.par)
gplot.layout.fruchtermanreingold(d, layout.par)
gplot.layout.geodist(d, layout.par)
gplot.layout.hall(d, layout.par)
gplot.layout.kamadakawai(d, layout.par)
gplot.layout.mds(d, layout.par)
gplot.layout.princoord(d, layout.par)
gplot.layout.random(d, layout.par)
gplot.layout.rmds(d, layout.par)
gplot.layout.segeo(d, layout.par)
gplot.layout.seham(d, layout.par)
gplot.layout.spring(d, layout.par)
gplot.layout.springrepulse(d, layout.par)
gplot.layout.target(d, layout.par)



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

参数:d
an adjacency matrix, as passed by gplot.
邻接矩阵,通过gplot。


参数:layout.par
a list of parameters.
的参数的列表。


Details

详细信息----------Details----------

Vertex layouts for network visualization pose a difficult problem &ndash; there is no single, &ldquo;good&rdquo; layout algorithm, and many different approaches may be valuable under different circumstances.  With this in mind, gplot allows for the use of arbitrary vertex layout algorithms via the gplot.layout.* family of routines.  When called, gplot searches for a gplot.layout function whose third name matches its mode argument (see gplot help for more information); this function is then used to generate the layout for the resulting plot.  In addition to the routines documented here, users may add their own layout functions as needed.  The requirements for a gplot.layout function are as follows:  <ol> the first argument, d, must be the (dichotomous) graph adjacency matrix;
顶点网络可视化的布局,构成一个棘手的问题 - 有没有一个单一的,“好”的布局算法,在不同的情况下,许多不同的方法可能是有价值的。考虑到这一点,gplot允许使用任意顶点布局算法,通过gplot.layout.*系列例程。当被调用时,gplot搜索的gplot.layout函数的第三个名字符合其mode参数(见gplot帮助的详细信息);此功能用于生成布局的图。除了这里记录的例程,根据需要,用户可以添加其自己的布局功能。一个gplot.layout功能的要求如下:<OL>的第一个参数,d,必须是图的邻接矩阵(二分);

the second argument, layout.par, must be a list of parameters (or NULL, if no parameters are specified); and
第二个参数,layout.par,必须是一个参数列表(或NULL,如果没有指定任何参数);

the return value must be a real matrix of dimension c(2,NROW(d)), whose rows contain the vertex coordinates. </ol>  Other than this, anything goes.  (In particular, note that layout.par could be used to pass additional matrices, if needed.)  
返回值必须是一个真正的矩阵尺寸的c(2,NROW(d)),其行包含的顶点坐标。 </ OL>除此之外,任何事情都会发生。 (特别要注意的是layout.par可以用来传递额外的矩阵,如果需要的话。)

The graph.layout functions currently supplied by default are as follows:   
graph.layout目前默认提供的功能如下:

circle This function places vertices uniformly in a circle; it takes no arguments.
此功能顶点均匀圈了一圈,它不带任何参数。

eigen This function places vertices based on the eigenstructure of the adjacency matrix.  It takes the following arguments:   
本征顶点的邻接矩阵的特征结构的基础上,此功能的地方。它采用下列参数:

layout.par\$var  This argument controls the matrix to be used for the eigenanalysis.  "symupper", "symlower", "symstrong", "symweak" invoke symmetrize on d with the respective symmetrizing rule.  "user" indicates a user-supplied matrix (see below), while "raw" indicates that d should be used as-is.  (Defaults to "raw".)
layout.par \ $ var该参数控制矩阵的特征分析要用于。 "symupper","symlower","symstrong","symweak"调用symmetrized各自的对称化规则。 "user"表示用户提供的矩阵(见下文),而"raw"d应作为,是。 (缺省值到"raw"。)

layout.par\$evsel If "first", the first two eigenvectors are used; if "size", the two eigenvectors whose eigenvalues have the largest magnitude are used instead. Note that only the real portion of the associated eigenvectors is used.  (Defaults to "first".)
layout.par evsel \ $如果"first",前两个特征向量被使用;如果"size",具有最大幅值的两个特征向量的特征值代替。请注意,只有相关的特征向量的实部。 (缺省值到"first"。)

layout.par\$mat  If layout.par\$var=="user", this matrix is used for the eigenanalysis. (No default.)      
layout.par \ $垫,如果layout.par\$var=="user",该矩阵被用于的特征分析。 (无缺省值)。

fruchtermanreingold This function generates a layout using a variant of Fruchterman and Reingold's force-directed placement algorithm.  It takes the following arguments:   
fruchtermanreingold此功能使用的FRUCHTERMAN莱因戈尔德力的布局算法的一个变种生成的布局。它采用下列参数:

layout.par\$niter  This argument controls the number of iterations to be employed.  Larger values take longer, but will provide a more refined layout.  (Defaults to 500.)  
layout.par \ $硝此参数控制被雇用的迭代次数。值越大,需要更长的时间,但会提供一个更精确的布局。 (默认为500)。

layout.par\$max.delta Sets the maximum change in position for any given iteration.   (Defaults to n.)
layout.par \ $ max.delta设置为任何给定的迭代中的位置的最大变化量。 (缺省值到n。)

layout.par\$area  Sets the &ldquo;area&rdquo; parameter for the F-R algorithm. (Defaults to n^2.)
layout.par \ $区域设置“区域”的FR算法的参数。 (缺省值到n^2。)

layout.par\$cool.exp  Sets the cooling exponent for the annealer. (Defaults to 3.)
layout.par \ $ cool.exp设置的退火的冷却指数。 (默认值为3)。

layout.par\$repulse.rad  Determines the radius at which vertex-vertex repulsion cancels out attraction of adjacent vertices.  (Defaults to area*log(n).)
“layout.par \ $ repulse.rad确定的半径在的顶点顶点排斥取消相邻顶点的吸引力。 (缺省值到area*log(n)。)

layout.par\$ncell  To speed calculations on large graphs, the plot region is divided at each iteration into ncell by ncell &ldquo;cells&rdquo;, which are used to define neighborhoods for force calculation.  Moderate numbers of cells result in fastest performance; too few cells (down to 1, which produces &ldquo;pure&rdquo; F-R results) can yield odd layouts, while too many will result in long layout times.  (Defaults to n^0.4.)
layout.par \ $ NCELL大图速度计算,该图区域划分在每一次迭代ncellncell“单元”,这是用来定义邻里力的计算。中等数量的单元在最快的性能,太少单元(1,生产的“纯”FR结果)可以产生奇怪的布局,而太多会导致术语布局的时间。 (缺省值到n^0.4。)

layout.par\$cell.jitter  Jitter factor (in units of cell width) used in assigning vertices to cells.  Small values may generate &ldquo;grid-like&rdquo; anomalies for graphs with many isolates.  (Defaults to 0.5.)
layout.par \ $ cell.jitter抖动因子(单元格的宽度为单位),用于分配顶点到单元。小的数值可能会产生“网格状”异常图的许多菌株。 (缺省值到0.5。)

layout.par\$cell.pointpointrad  Squared &ldquo;radius&rdquo; (in units of cells) such that exact point interaction calculations are used for all vertices belonging to any two cells less than or equal to this distance apart.  Higher values approximate the true F-R solution, but increase computational cost.  (Defaults to 0.)
layout.par \ $ cell.pointpointrad次方“半径”(单位的单元中),使得计算确切点相互作用用于属于任何两个单元的距离小于或等于的所有顶点的。较高的值近似真实的FR的解决方案,但增加计算成本。 (缺省值到0。)

layout.par\$cell.pointcellrad  Squared &ldquo;radius&rdquo; (in units of cells) such that approximate point/cell interaction calculations are used for all vertices belonging to any two cells less than or equal to this distance apart (and not within the point/point radius).  Higher values provide somewhat better approximations to the true F-R solution at slightly increased computational cost.  (Defaults to 18.)
layout.par \ $ cell.pointcellrad次方“半径”(以单位的单元)使得用于所有顶点属于任何两个单元的小于或等于这个距离分开(近似点/单元间相互作用的计算,而不是在点/点半径)。值越高,提供更好一些近似的真实FR解决方案在计算成本略有增加。 (缺省值到18。)

layout.par\$cell.cellcellrad  Squared &ldquo;radius&rdquo; (in units of cells) such that approximate cell/cell interaction calculations are used for all vertices belonging to any two cells less than or equal to this distance apart (and not within the point/point or point/cell radii).  Higher values provide somewhat better approximations to the true F-R solution at slightly increased computational cost.  Note that cells beyond this radius (if any) do not interact, save through edge attraction. (Defaults to ncell^2.)
layout.par \ $ cell.cellcellrad次方“半径”(以单位的单元)使得用于所有顶点属于任何两个单元的小于或等于这个距离(近似单元/单元间相互作用的计算,而不是在点/点/点或小区半径)。值越高,提供更好一些近似的真实FR解决方案在计算成本略有增加。请注意,超出这个半径(如果有的话)的单元不发生相互作用,保存通过边的吸引力。 (缺省值到ncell^2。)

layout.par\$seed.coord A two-column matrix of initial vertex coordinates.  (Defaults to a random circular layout.)         
layout.par \ $ seed.coord两列矩阵的初始顶点坐标。 (默认为一个随机的圆形布局。)

hall This function places vertices based on the last two eigenvectors of the Laplacian of the input matrix (Hall's algorithm).  It takes no arguments.
大厅这个函数的地方根据输入矩阵的拉普拉斯算子(霍尔的算法)的最后两个特征向量的顶点。它不带任何参数。

kamadakawai This function generates a vertex layout using a version of the Kamada-Kawai force-directed placement algorithm.  It takes the following arguments:   
kamadakawai这个函数生成一个顶点布局,使用一个版本的镰田川井力导向布局算法。它采用下列参数:

layout.par\$niter  This argument controls the number of iterations to be employed.  (Defaults to 1000.)  
layout.par \ $硝此参数控制被雇用的迭代次数。 (默认为1000)。

layout.par\$sigma Sets the base standard deviation of position change proposals.   (Defaults to NROW(d)/4.)
layout.par \ $西格玛设置基本标准偏差,位置变化的建议。 (缺省值到NROW(d)/4。)

layout.par\$initemp  Sets the initial "temperature" for the annealing algorithm. (Defaults to 10.)
layout.par \ $ initemp设置退火算法最初的“温度”。 (默认为10)。

layout.par\$cool.exp  Sets the cooling exponent for the annealer. (Defaults to 0.99.)
layout.par \ $ cool.exp设置的退火的冷却指数。 (默认为0.99)。

layout.par\$kkconst  Sets the Kamada-Kawai vertex attraction constant.  (Defaults to NROW(d)^2.)
layout.par \ $ kkconst设置的镰田川井顶点的引力常数。 (缺省值到NROW(d)^2。)

layout.par\$elen  Provides the matrix of interpoint distances to be approximated.  (Defaults to the geodesic distances of d after symmetrizing, capped at sqrt(NROW(d)).)
layout.par \ $ ELEN提供近似的矩阵INTERPOINT距离。 (默认值的测量距离d对称后,上限为sqrt(NROW(d))。)

layout.par\$seed.coord A two-column matrix of initial vertex coordinates.  (Defaults to a gaussian layout.)         
layout.par \ $ seed.coord两列矩阵的初始顶点坐标。 (默认设置到高斯的布局。)

mds This function places vertices based on a metric multidimensional scaling of a specified distance matrix.  It takes the following arguments:   
MDS此功能的基础上指定的距离矩阵度量多维标度的地方顶点。它采用下列参数:

layout.par\$var  This argument controls the raw variable matrix to be used for the subsequent distance calculation and scaling.  "rowcol", "row", and "col" indicate that the rows and columns (concatenated), rows, or columns (respectively) of d should be used.  "rcsum" and "rcdiff" result in the sum or difference of d and its transpose being employed.  "invadj" indicates that max{d}-d should be used, while "geodist" uses geodist to generate a matrix of geodesic distances from d. Alternately, an arbitrary matrix can be provided using "user".  (Defaults to "rowcol".)
layout.par \ $ var该参数控制原料的变量矩阵被用于随后的距离计算和缩放。 "rowcol","row"和"col"的行和列(串联),行或列(分别)d应该使用。 "rcsum"和"rcdiff"d和它的转置被雇用的和或差结果。 "invadj"max{d}-d应使用的,而"geodist"使用geodist的从d生成矩阵的测量距离。另外,任意矩阵可以提供使用"user"。 (缺省值到"rowcol"。)

layout.par\$dist The distance function to be calculated on the rows of the variable matrix.  This must be one of the method parameters to dist ("euclidean", "maximum", "manhattan", or "canberra"), or else "none".  In the latter case, no distance function is calculated, and the matrix in question must be square (with dimension dim(d)) for the routine to work properly.  (Defaults to "euclidean".)
layout.par \ $ dist该距离的函数来进行计算的变量矩阵的行上。这必须是一个method(dist,"euclidean","maximum"或"manhattan"),否则<X"canberra"参数>。在后者的情况下,没有距离的函数来计算,和问题中的矩阵必须是正方形的(维度"none")的例程,以正常工作。 (缺省值到dim(d)。)

layout.par\$exp The power to which distances should be raised prior to scaling.  (Defaults to 2.)
layout.par \ $进出口的权力距离应提高缩放。 (默认为2)。

layout.par\$vm If layout.par\$var=="user", this matrix is used for the distance calculation. (No default.)   
layout.par \ $的vm如果layout.par\$var=="user",该矩阵用于所述距离计算。 (无缺省值)。

Note: the following layout functions are based on mds:   
注意:下面的布局功能的基础上mds:

adj scaling of the raw adjacency matrix, treated as similarities (using "invadj").
调整缩放原始的邻接矩阵,视为相似之处(使用"invadj",)。

geodist scaling of the matrix of geodesic distances.
测量距离矩阵geodist缩放。

rmds euclidean scaling of the rows of d.
RMDS欧几里得缩放行d。

segeo scaling of the squared euclidean distances between row-wise geodesic distances (i.e., approximate structural equivalence).
segeo缩放之间行明智的测量距离的(即近似的结构等价)的平方欧氏距离。

seham scaling of the Hamming distance between rows/columns of d (i.e., another approximate structural equivalence scaling).      
seham缩放d(即,另一个近似结构等价缩放的行/列)之间的海明距离。

princoord This function places vertices based on the eigenstructure of a given correlation/covariance matrix. It takes the following arguments:   
princoord此功能将根据一个给定的相关性/协方差矩阵的特征结构的顶点。它采用下列参数:

layout.par\$var  The matrix of variables to be used for the correlation/covariance calculation.  "rowcol", "col", and "row" indicate that the rows/cols, columns, or rows (respectively) of d should be employed.  "rcsum" "rcdiff" result in the sum or difference of d and t(d) being used.  "user" allows for an arbitrary variable matrix to be supplied.  (Defaults to "rowcol".)
layout.par \ $ var目录被用于相关/协方差计算的矩阵的变量。 "rowcol","col"和"row"行/列,列,或行分别d应采用。 "rcsum""rcdiff" d和t(d)正在使用的和或差的。 "user"允许以供给的任意变量矩阵。 (缺省值到"rowcol"。)

layout.par\$cor Should the correlation matrix (rather than the covariance matrix) be used?  (Defaults to TRUE.)
layout.par \ $对应的相关系数矩阵(而不是协方差矩阵)? (缺省值到TRUE。)

layout.par\$vm If layout.par\$var=="user", this matrix is used for the correlation/covariance calculation. (No default.)      
layout.par \ $ vm的,如果layout.par\$var=="user",该矩阵的相关/协方差计算用于。 (无缺省值)。

random This function places vertices randomly.  It takes the following argument:   
此功能随机地随机的顶点。它采用下列参数:

layout.par\$dist  The distribution to be used for vertex placement.  Currently, the options are "unif" (for uniform distribution on the square), "uniang" (for a &ldquo;gaussian donut&rdquo; configuration), and "normal" (for a straight Gaussian distribution).  (Defaults to "unif".)    Note: circrand, which is a frontend to the "uniang" option, is based on this function.   
layout.par \ $区的分布,用于顶点位置。目前,该选项是"unif"均匀分布在广场上,"uniang"(一个的“高斯甜甜圈”的配置),和"normal"(直高斯分布)。 (默认"unif"。)注意:circrand“是一个前端"uniang"选项,基于此功能。

spring This function places vertices using a spring embedder.  It takes the following arguments:   
Spring的功能的地方顶点的弹簧嵌入。它采用下列参数:

layout.par\$mass  The vertex mass (in &ldquo;quasi-kilograms&rdquo;).  (Defaults to 0.1.)
layout.par \ $质量的顶点质量(在“准公斤”)。 (缺省值到0.1。)

layout.par\$equil The equilibrium spring extension (in &ldquo;quasi-meters&rdquo;). (Defaults to 1.)
layout.par \ $角球的平衡弹簧延长(“准米”)。 (缺省值到1。)

layout.par\$k The spring coefficient (in &ldquo;quasi-Newtons per quasi-meter&rdquo;). (Defaults to 0.001.)
layout.par \ $ K的弹簧系数(在“准准牛顿每米”)。 (缺省值到0.001。)

layout.par\$repeqdis The point at which repulsion (if employed) balances out the spring extension force (in &ldquo;quasi-meters&rdquo;). (Defaults to 0.1.)
layout.par \ $ repeqdis排斥(如果使用的话)平衡点伸长弹簧力(“准米”)。 (缺省值到0.1。)

layout.par\$kfr The base coefficient of kinetic friction (in &ldquo;quasi-Newton quasi-kilograms&rdquo;). (Defaults to 0.01.)
layout.par \ $ KFR基的动摩擦系数(在“准牛顿准公斤”)。 (缺省值到0.01。)

layout.par\$repulse Should repulsion be used?  (Defaults to FALSE.)    Note: springrepulse is a frontend to spring, with repulsion turned on.   
layout.par \ $击退应该排斥使用? (默认FALSE。)注:springrepulse是一个前端到spring,排斥打开。

target This function produces a "target diagram" or "bullseye" layout, using a Brandes et al.'s force-directed placement algorithm.  (See also gplot.target.)  It takes the following arguments:   
针对此功能产生一个“目标图”或“靶心”的布局,用布兰代斯等人的力导向布局算法。 (另见gplot.target)。它采用下列参数:

layout.par\$niter  This argument controls the number of iterations to be employed.  (Defaults to 1000.)  
layout.par \ $硝此参数控制被雇用的迭代次数。 (默认为1000)。

layout.par\$radii This argument should be a vector of length NROW(d) containing vertex radii.  Ideally, these should lie in the [0,1] interval (and odd behavior may otherwise result).  (Defaults to the affine-transformed Freeman degree centrality scores of d.)  
layout.par \ $半径参数应该是一个矢量的长度NROW(d)含顶点半径。在理想的情况下,这些应该趴在[0,1]区间内(和奇怪的行为可能导致的)。 (默认的仿射变换弗里曼degree核心分数d)。

layout.par\$minlen Sets the minimum edge length, below which edge lengths are to be adjusted upwards.  (Defaults to 0.05.)  
layout.par \ $,minlen设置最小边长,以下边的长度是向上调整。 (默认为0.05)。

layout.par\$area  Sets the initial "temperature" for the annealing algorithm. (Defaults to 10.)
layout.par \ $区域设置的模拟退火算法的初始“温度”。 (默认为10)。

layout.par\$cool.exp  Sets the cooling exponent for the annealer. (Defaults to 0.99.)
layout.par \ $ cool.exp设置的退火的冷却指数。 (默认为0.99)。

layout.par\$maxdelta  Sets the maximum angular distance for vertex moves.  (Defaults to pi.)
layout.par \ $ maxdelta设置顶点移动的最大角距离。 (缺省值到pi。)

layout.par\$periph.outside  Boolean; should "peripheral" vertices (in the Brandes et al. sense) be placed together outside the main target area?  (Defaults to FALSE.)
layout.par \ $ periph.outside布尔值;“外围”的顶点(在布兰代斯等人。感)以外的主要目标区域放在一起? (缺省值到FALSE。)

layout.par\$periph.outside.offset  Radius at which to place "peripheral" vertices if periph.outside==TRUE.  (Defaults to 1.2.)
如果将“周边”顶点layout.par的\ $ periph.outside.offset半径在periph.outside==TRUE。 (默认为1.2)。

layout.par\$disconst  Multiplier for the Kamada-Kawai-style distance potential.  (Defaults to 1.)
layout.par \ $ disconst乘数的镰田河合距离的潜力。 (默认为1)。

layout.par\$crossconst  Multiplier for the edge crossing potential.  (Defaults to 1.)
layout.par \ $ crossconst乘数的边缘交叉的潜力。 (默认为1)。

layout.par\$repconst  Multiplier for the vertex-edge repulsion potential.  (Defaults to 1.)
layout.par \ $ repconst乘数排斥潜在的顶点边缘。 (默认为1)。

layout.par\$minpdis  Sets the "minimum distance" parameter for vertex repulsion.   (Defaults to 0.05.)     
layout.par \ $ minpdis顶点排斥的“最小距离”参数设置。 (默认为0.05)。

  



值----------Value----------

A matrix whose rows contain the x,y coordinates of the vertices of d.
矩阵的行包含的x,y坐标的顶点的d。


(作者)----------Author(s)----------


Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>



参考文献----------References----------

Brandes, U.; Kenis, P.; and Wagner, D.  (2003).  &ldquo;Communicating Centrality in Policy Network Drawings.&rdquo; IEEE Transactions on Visualization and Computer Graphics, 9(2):241-253.
Fruchterman, T.M.J. and Reingold, E.M.  (1991).  &ldquo;Graph Drawing by Force-directed Placement.&rdquo; Software - Practice and Experience, 21(11):1129-1164.
Kamada, T. and Kawai, S.  (1989).  &ldquo;An Algorithm for Drawing General Undirected Graphs.&rdquo; Information Processing Letters, 31(1):7-15.

参见----------See Also----------

gplot, gplot.target, gplot3d.layout, cmdscale, eigen
gplot,gplot.target,gplot3d.layout,cmdscale,eigen

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-6 13:33 , Processed in 0.023682 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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