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

R语言 Rgraphviz包 GraphvizLayouts()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-22 20:54:01 | 显示全部楼层 |阅读模式
GraphvizLayouts(Rgraphviz)
GraphvizLayouts()所属R语言包:Rgraphviz

                                        Graphviz Layout Methods
                                         Graphviz的布局方法

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

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

The following describes the different layout methods that can be used within Rgraphviz.  Each layout method has its own particular advantages and disadvantages and can have its own quirks.  Currently Rgraphviz supports three different layout methods: dot, twopi and neato.
下面描述了不同的布局,可以在Rgraphviz方法。每个布局的方法有其独特的优势和劣势,都可以有自己的怪癖。目前Rgraphviz支持三种不同的布局方法:dot,twopi和neato。


Details

详情----------Details----------

Portions of the layout descriptions were taken from documents provided at http://www.research.att.com/sw/graphviz.  The specific documents are listed in the references section of this page.
布局描述的部分被采取的来自于http://www.research.att.com/sw/graphviz提供的文件。 references此页的部分中列出的具体文件。


点布局----------The dot layout----------

The dot algorithm produces a ranked layout of a graph honoring edge directions. It is particularly appropriate for displaying hierarchies or directed acyclic graphs. The basic layout scheme is attributed to Sugiyama et al. The specific algorithm used by dot follows the steps described by Gansner et al.
dot算法产生一个尊敬的边缘方向图的排列布局。特别是适当的层次结构或向无环图显示。杉山爱等基本布局计划。点使用的具体算法如下由Gansner等人所描述的步骤。

dot draws a graph in four main phases. Knowing this helps you to understand what kind of layouts dot makes and how you can control them.  The layout procedure used by dot relies on the graph being acyclic. Thus, the first step is to break any cycles which occur in the input graph by reversing the internal direction of certain cyclic edges. The next step assigns nodes to discrete ranks or levels. In a top-to-bottom drawing, ranks determine Y coordinates. Edges that span more than one rank are broken into chains of virtual nodes and unit-length edges. The third step orders nodes within ranks to avoid crossings. The fourth step sets X coordnates of nodes to keep edges short, and the final step routes edge splines.
dot绘制图在四个主要阶段。知道了这一点,可以帮助你了解什么样的布局点,以及如何可以控制他们。依赖图非周期性点使用的布局过程。因此,第一步就是要打破输入图中的任何周期发生扭转内部的某些循环的边缘方向。下一步分配离散的职级或级别的节点。在顶底绘图,职级确定Y坐标。跨越多个排名的边缘被分解成virtual节点和单位长度的边缘链。第三步订单节点内的行列,以避免口岸。第四步设置的X coordnates的节点保持边缘短,路线边花键的最后一步。

In dot, higher edge weights have the effect of causing edges to be shorter and straighter.
在dot,边权重较高造成边缘短,直的效果。

Fine-tuning should be approached cautiously. dot works best when it can makes a layout without much help or interference in its placement of individual nodes and edges. Layouts can be adjusted somewhat by increasing the weight of certain edges, and sometimes even by rearranging the order of nodes and edges in the file. But this can backfire because the layouts are not necessarily stable with respect to changes in the input graph. One last adjustment can invalidate all previous changes and make a very bad drawing.
微调应谨慎接触。 dot时效果最好,它可以使没有多少help或干扰其个别节点和边的位置布局。可以通过增加某些边的重量,有时甚至通过重新排列文件中的节点和边缘的顺序有所调整布局。但是,这可能会适得其反,因为布局是不是输入图中的变化不一定稳定。最后一个调整无效以往所有的变化,使一个非常糟糕的绘图。


neato布局----------The neato layout----------

neato is a program that makes layouts of undirected graphs following the filter model of dot. Its layout heuristic creates virtual physical models and runs an iterative solver to find low energy configurations.  An ideal spring is placed between every pair of nodes such that its length is set to the shortest path distance between the endpoints. The springs push the nodes so their geometric distance in the layout approximates their path distance in the graph.
neato是一个程序,使无向图的布局后dot过滤模型。其布局启发式创建虚拟的物理模型和运行迭代求解找到低能量配置。等,其长度设置为端点之间的最短路径距离的每一个节点对之间放置一个理想的春天。弹簧推节点,所以他们在布局的几何距离接近他们在图中的路径距离。

In neato, the edge weight is the strength of the corresponding spring.
在neato,边的权重是相应的弹簧强度。

As with dot, fine-tuning should be approached cautiously, as often small changes can have a drastic effect and create a poor looking layout.
与dot,微调应谨慎接触,经常微小的变化能有重大影响,并创建一个贫穷的布局。


twopi布局----------The twopi layout----------

The radial layout algorithm represented by twopi is conceptually the simplest. It takes a node specified as the center of the layout and the root of the generated spanning tree. The remaining nodes are placed on a series of concentric circles about the center, the circle used corresponding to the graph-theoretic distance from the node to the center. Thus, for example, all of the neighbors of the center node are placed on the first circle around the center. The algorithm allocates angular slices to each branch of the induced spanning tree to guarantee enough space for the tree on each ring.  It should be obvious from the description that the basic version of the twopi algorithm relies on the graph being connected.
twopi代表径向布局算法是概念上最简单的。它需要指定一个节点为中心的布局和生成生成树的根。其余节点上放置了一系列有关该中心的同心圆,循环使用相应的图形理论距离,从中心节点。因此,例如,所有的中心节点的邻居都放在围绕中心的第一个圆。该算法分配角片引起生成树的每个分支,以保证有足够的空间,每个环上的树。这应该是显而易见的描述,基本版本的twopi算法依赖于连接图。

Of great importance to the quality of the layout is the selection of an appropriate center node.  By default, the twopi will randomly pick one of the nodes that are furthest from a leaf node, where a leaf node is a node of degree 1.  The root attribute can be used to manually select a central node for the layout, and users are encouraged to use this attribute to select a node which provides a good quality layout.  It often might not be obvious what that node will be, as it will vary from graph to graph, so some experimentation might be required.
重视质量的布局是选择一个合适的中心节点。默认情况下,twopi会随机挑选一个是从叶节点最远的节点,叶节点是节点度1。 root属性可以用来手动选择布局的一个中心节点,并鼓励用户使用此属性来选择一个节点,它提供了一个良好的品质布局。它往往可能不是很明显是什么节点会,因为它会有所不同,从图到图,所以可能需要一些试验。

As with dot and neato, fine-tuning should be approached cautiously, as often small changes can have a drastic effect and create a poor looking layout.  The root node of the layout, as mentioned before, can have a profound effect on the outcome of the layout and care should be taken to select an appropriate one.
与dot和neato,微调应谨慎接触,往往是小的变化可以有重大影响,并创建一个贫穷的布局。 root节点布局,提到之前,可以有一个布局的结果和护理产生深远的影响,应采取一个适当的选择。


在Circo布局----------The circo layout----------

The circo layout method draws graphs using a circular layout (see Six and Tollis, GD '99 and ALENEX '99, and Kaufmann and Wiese, GD '02.)  The tool identifies biconnected components and draws the nodes of the component on a circle.  The block-cutpoint tree is then laid out using a recursive radial algorithm.  Edge crossings within a circle are minimized by placing as many edges on the circle's perimeter as possible.  In particular, if the component is outerplanar, the component will have a planar layout.
circo布局方法绘制图表,采用圆形布局(见六,Tollis,广东99和99 ALENEX,考夫曼和维泽,02广东),工具标识双连通部件和组件的绘制节点一个圆圈。块分割点树递归径向算法的使用奠定了。内圆边的口岸,是把尽可能多的圆的周长边缘最小化。特别是,如果该组件是外平面图,该组件将有平面布局。

If a node belongs to multiple non-trivial biconnected components, the layout puts the node in one of them.  By default, this is the first non-trivial component found in the search from the root component.
如果一个节点属于多个非平凡的双连通组件,布局在其中的一个节点。默认情况下,这是第一个非平凡的组成部分,在搜索发现从根组件。


自民党布局----------The fdp layout----------

The fdp layout draws undirected graphs using a spring model similar to neato.  It relies on a force-directed approach in the spirit of Fruchterman and Reingold.  The fdp model uses springs only between nodes connected with an edge, and an electrical repulsive force between all pairs of nodes.  Also, it achieves a layout by minimizing the forces rather than the energy of the system.
fdp布局绘制无向图,使用类似neato的弹簧模型。它依赖于在Fruchterman和莱因戈尔德精神力的方法。 fdp模型之间只用一条边连接的节点,所有节点对之间的电气斥力的弹簧。此外,它实现了最小化的力量,而不是系统的能量的布局。


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


Jeff Gentry



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

http://www.research.att.com/sw/tools/graphviz/neatoguide.pdf,

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

GraphvizAttributes, plot.graph,
GraphvizAttributes,plot.graph


举例----------Examples----------


set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)
if (interactive()) {
  op <- par()
  on.exit(par=op)
  par(ask=TRUE)
  plot(g1, "dot")
  plot(g1, "neato")
  plot(g1, "twopi")
}

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-22 15:46 , Processed in 0.023160 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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