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

R语言 graph包 renderInfo-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 21:12:31 | 显示全部楼层 |阅读模式
renderInfo-class(graph)
renderInfo-class()所属R语言包:graph

                                        Class "renderInfo"
                                         类“renderInfo”

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

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

A container class to manage graph rendering attributes.
一个容器类管理图形渲染属性。


类的对象----------Objects from the Class----------

Objects can be created by calls of the form new("renderInfo") or by using the initializer .renderInfoPrototype.
可以创建对象的形式new("renderInfo")来电或使用初始化.renderInfoPrototype的。


插槽----------Slots----------




pars: List of default rendering attributes with two items nodes and edges. When not set further down the parameter hierarchy, these defaults will be used for all
pars:列表属性的默认渲染两个项目nodes和edges。当没有定下参数层次进一步,这些设置将被用于所有




nodes: Named list of attributes specific to nodes.
nodes:指定特定节点的属性列表。




edges: Named list of attributes specific to edges.
edges:命名边特定的属性列表。




graph: Named list of graph-wide attributes.
graph:为全图的属性列表。

Each item of nodes and edges can take arbitrary vectors, the only restriction is that they have to be of either length 1 or length equal to the number of nodes or edges, respectively.
nodes和edges可以采取任意向量,唯一的限制是,他们分别是长度为1或长度等于节点或边缘,每个项目。

pars and graph can take arbitrary skalars, the latter
pars和graph可以采取任意skalars,后者


方法----------Methods----------

The following are functions rather than methods and build the API to control the graphical output of a graph when it is plotted using renderGraph.
以下是功能,而不是方法和建立的API来控制图形的图形输出,当它被绘制使用renderGraph。




parRenderInfo, parRenderInfo<- getter and setter for
parRenderInfo,parRenderInfo < -  getter和setter的




nodeRenderInfo, nodeRenderInfo<- getter and setter for
nodeRenderInfo,nodeRenderInfo < -  getter和setter的




edgeRenderInfo, edgeRenderInfo<- getter and setter for
edgeRenderInfo,edgeRenderInfo < -  getter和setter的




graphRenderInfo, graphRenderInfo<- getter and setter for
graphRenderInfo,graphRenderInfo < -  getter和setter的

The getters all take two arguments: g is a graph object and name is a character giving the name of one of the item in the respective slot. When name is missing this will give you the whole list.
干将都需要两个参数:g是一个图形对象和name是一个字符,在各自的插槽中的项目之一的名称。当name缺少这会给你的整个列表。

The setters are a bit more complex: nodeRenderInfo<- and edgeRenderInfo<- can take
setter方法是一个比较复杂的:nodeRenderInfo<-和edgeRenderInfo<-可以采取




named list of named vectors where the names have to match the node or edge names. Items in the vector that don't match a valid edge or node name will be silently ignored. For undirected edges the order of head nodes and tail nodes in edge names is ignored,
名为命名为向量的名称必须匹配的节点或边名称列表。向量项目不符合一个有效的边缘或节点名称将被忽略。对于无向边的边缘名头节点和尾节点的顺序将被忽略,




named list of skalars which will set all the attribute for all
命名的skalars名单将设置所有的属性

parRenderInfo<-will only take a list with items nodes, edges and graph. The content of these list items can be arbitrary named vectors. parRenderInfo<-takes an arbitrary list
parRenderInfo<-只会采取与项目名单nodes,edges和graph。这些列表项的内容可以任意命名的向量。 parRenderInfo<-任意列表

Available rendering parameters for nodes are:
节点可用的渲染参数是:




col:  the color of the line drawn as node border. Defaults to
山口:绘制节点边界线的颜色。默认为




lty:  the type of the line drawn as node border. Defaults to solid. Valid values are the same as for the R's base
LTY:绘制节点边界线的类型。 solid默认。有效值是同为R的基础




lwd:  the width of the line drawn as node border. Defaults to 1. Note that the underlying low level plotting functions do not support vectorized lwd values. Instead, only the first
LWD:绘制节点边界线的宽度。 1默认。请注意,底层的低级绘图函数不支持矢量lwd值。相反,只有第一




fill:  the color used to fill a node. Defaults to
填充:用来填充一个节点的颜色。默认为




textCol:  the font color used for the node labels. Defaults
textCol:用于节点标签的字体颜色。默认




fontsize:  the font size for the node labels in points. Defaults to 14. Note that the fontsize will be automatically adjusted to make sure that all labels fit their respective nodes. You may want to increase the node size by supplying the appropriate layout parameters to Graphviz
字号:点节点标签的字体大小。 14默认。请注意,对于fontsize将自动调整,以确保所有标签符合各自的节点。你可能想增加节点的大小,通过提供适当的布局参数Graphviz




cex:  Expansion factor to further control the fontsize. As default, this parameter is not set, in which case the fontsize will be clipped to the node size. This mainly exists to for consistency with the base graphic parameters and to override the
CEX:膨胀系数,以进一步控制fontsize的。由于默认情况下,这个参数没有设置,在这种情况下,节点的大小fontsize的将被截去。这主要存在为碱基的图形参数的一致性,并覆盖

Available rendering parameters for edges are:
边缘可用的渲染参数是:




col:  the color of the edge line. Defaults to black.
山口:边缘线的颜色。 black默认。




lty:  the type of the edge line. Defaults to solid. Valid values are the same as for the R's base
LTY:边缘线的类型。 solid默认。有效值是同为R的基础




lwd:  the width of the edge line. Defaults to 1.
LWD:边缘线的宽度。 1默认。




textCol:  the font color used for the edge labels. Defaults
textCol:边缘标签使用的字体颜色。默认




fontsize:  the font size for the edge labels in
字号:边缘标签的字体大小




cex:  Expansion factor to further control the fontsize. This
CEX:膨胀系数,以进一步控制fontsize的。这


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


Deepayan Sarkar, Florian Hahne



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


g <- randomGraph(letters[1:4], 1:3, p=0.8)
nodeRenderInfo(g) <- list(fill=c("a"="red", "b"="green"))
edgeRenderInfo(g) <- list(lwd=3)
edgeRenderInfo(g) <- list(lty=3, col="red")
parRenderInfo(g) <- list(edges=list(lwd=2, lty="dashed"),
nodes=list(col="gray", fill="gray"))
nodeRenderInfo(g)
edgeRenderInfo(g, "lwd")
edgeRenderInfo(g, c("lwd", "col"))
parRenderInfo(g)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-25 14:00 , Processed in 0.031954 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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