layout(RBGL)
layout()所属R语言包:RBGL
Layout an undirected graph in 2D
布局在二维的无向图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Layout an undirected graph in 2D
布局在二维的无向图
用法----------Usage----------
circleLayout(g, radius=1)
kamadaKawaiSpringLayout( g, edge_or_side=1, es_length=1 )
fruchtermanReingoldForceDirectedLayout(g, width=1, height=1)
randomGraphLayout(g, minX=0, maxX=1, minY=0, maxY=1)
参数----------Arguments----------
参数:g
an instance of the graph class with edgemode “undirected”
graph与edgemode“无向”类的一个实例
参数:radius
radius of a regular n-polygon
一个正n边形的半径
参数:edge_or_side
boolean indicating the length is for an edge or for a side, default is for an edge
布尔值,指示的长度为一个边或一个侧面,默认为边缘
参数:es_length
the length of an edge or a side for layout
一个边长或布局方
参数:width
the width of the dislay area, all x coordinates fall in [-width/2, width/2]
显示像区域的宽度,所有的x坐标[宽/ 2,宽度/ 2]秋天
参数:height
the height of the display area, all y coordinates fall in [-height/2, height/2]
显示区域的高度,所有y坐标下降[身高/ 2,身高/ 2]
参数:minX
minimum x coordinate
最小的x坐标
参数:maxX
maximum x coordinate
最大的x坐标
参数:minY
minimum y coordinate
最小Y坐标
参数:maxY
maximum y coordinate
最大的y坐标
Details
详情----------Details----------
If you want to simply draw a graph, you should consider using package Rgraphviz. The layout options in package Rgraphviz: neato, circo and fdp, correspond to kamadaKawaiSpringLayout, circleLayout and fruchtermanReingoldForceDirectedLayout, respectively.
如果你想简单地画一个图,你应该考虑使用包Rgraphviz。包Rgraphviz布局选项:neato,circo和fdp,kamadaKawaiSpringLayout,circleLayout和fruchtermanReingoldForceDirectedLayout,分别对应。
Function circleLayout layouts the graph with the vertices at the points of a regular n-polygon. The distance from the center of the polygon to each point is determined by the radius parameter.
功能circleLayout布局图的同分在一个正n多边形的顶点。 radius参数决定从每个点的多边形中心的距离。
Function kamadaKawaiSpringLayout provides Kamada-Kawai spring layout for connected, undirected graphs. User provides either the unit length e of an edge in the layout or the length of a side s of the display area.
函数kamadaKawaiSpringLayout提供连接,无向图的镰田,河合春布局。用户提供布局的优势单位长度e或身旁的显示区域的长度。
Function randomGraphLayout places the points of the graph at random locations.
功能randomGraphLayout放置在任意位置图点。
Function fruchtermanReingoldForceDirectedLayout performs layout of unweighted, undirected graphs. It's a force-directed algorithm. The BGL implementation doesn't handle disconnected graphs very well, since it doesn't explicitly give each connected component a region proportional to its size.
功能fruchtermanReingoldForceDirectedLayout执行未加权,无向图的布局。这是一个力的算法。 BGL的实施不处理断开的图非常好,因为它没有明确给每个连接组件一个区域它的大小成正比。
See documentation on this function in Boost Graph Library for more details.
更多详情请参见Boost Graph库中的函数在这个文档。
值----------Value----------
A (2 x n) matrix, where n is the number of nodes in the graph, each column gives the (x, y)-coordinates for the corresponding node.
(2 XN)矩阵,其中n是图中的节点数量,每一列给出了相应的节点(X,Y)坐标。
作者(S)----------Author(s)----------
Li Long <li.long@isb-sib.ch>
参考文献----------References----------
by Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine; (Addison-Wesley, Pearson Education Inc., 2002), xxiv+321pp. ISBN 0-201-72914-8
参见----------See Also----------
layoutGraph
layoutGraph
举例----------Examples----------
con <- file(system.file("XML/conn.gxl",package="RBGL"), open="r")
coex <- fromGXL(con)
close(con)
coex <- ugraph(coex)
circleLayout(coex)
kamadaKawaiSpringLayout(coex)
randomGraphLayout(coex)
fruchtermanReingoldForceDirectedLayout(coex, 10, 10)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|