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

R语言:panel.cloud()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 19:07:11 | 显示全部楼层 |阅读模式
panel.cloud(lattice)
panel.cloud()所属R语言包:lattice

                                         Default Panel Function for cloud
                                         云的默认面板功能

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

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

These are default panel functions controlling cloud and wireframe displays.
这是默认的面板功能控制cloud和wireframe显示器。


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


panel.cloud(x, y, subscripts, z,
            groups = NULL,
            perspective = TRUE,
            distance = if (perspective) 0.2 else 0,
            xlim, ylim, zlim,
            panel.3d.cloud = "panel.3dscatter",
            panel.3d.wireframe = "panel.3dwire",
            screen = list(z = 40, x = -60),
            R.mat = diag(4), aspect = c(1, 1),
            par.box = NULL,
            xlab, ylab, zlab,
            xlab.default, ylab.default, zlab.default,
            scales.3d,
            proportion = 0.6,
            wireframe = FALSE,
            scpos,
            ...,
            at,
            identifier = "cloud")
panel.wireframe(...)
panel.3dscatter(x, y, z, rot.mat, distance,
                groups, type = "p",
                xlim, ylim, zlim,
                xlim.scaled, ylim.scaled, zlim.scaled,
                zero.scaled,
                col, col.point, col.line,
                lty, lwd, cex, pch,
                cross, ..., .scale = FALSE, subscripts,
                identifier = "3dscatter")
panel.3dwire(x, y, z, rot.mat = diag(4), distance,
             shade = FALSE,
             shade.colors.palette = trellis.par.get("shade.colors")$palette,
             light.source = c(0, 0, 1000),
             xlim, ylim, zlim,
             xlim.scaled,
             ylim.scaled,
             zlim.scaled,
             col = if (shade) "transparent" else "black",
             lty = 1, lwd = 1,
             alpha,
             col.groups = superpose.polygon$col,
             polynum = 100,
             ...,
             .scale = FALSE,
             drape = FALSE,
             at,
             col.regions = regions$col,
             alpha.regions = regions$alpha,
             identifier = "3dwire")



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

参数:x, y, z
numeric (or possibly factors) vectors representing the data to be displayed. The interpretation depends on the context.  For panel.cloud these are essentially the same as the data passed to the high level plot (except if formula was a matrix, the appropriate x and y vectors are generated).  By the time they are passed to panel.3dscatter and panel.3dwire, they have been appropriately subsetted (using subscripts) and scaled (to lie inside a bounding box, usually the [-0.5, 0.5] cube).  Further, for panel.3dwire, x and y are shorter than z and represent the sorted locations defining a rectangular grid. Also in this case, z may be a matrix if the display is grouped, with each column representing one surface.  In panel.cloud (called from wireframe) and panel.3dwire, x, y and z could also be matrices (of the same dimension) when they represent a 3-D surface parametrized on a 2-D grid.  
数字(或可能因素)代表的数据显示向量。依赖于上下文的解释。 panel.cloud这些在本质上是相同的数据传递到高层次的图(如果formula是一个矩阵,适当x和y向量生成除外)。的时候,他们正在通过panel.3dscatter和panel.3dwire,他们得到适当的子集(使用subscripts)和缩放(躺在一个边框内,通常在[-0.5,0.5]立方体)。此外,panel.3dwire,x和y比z短,代表定义一个矩形网格的排序位置。另外,在这种情况下,z可能是一个矩阵,如果分组显示,每列代表一个面。在panel.cloud(wireframe)panel.3dwire,x,y和z也可能是矩阵(相同尺寸)时调用他们代表一个3-D表面上的2-D网格参数化。


参数:subscripts
index specifying which points to draw. The same x, y and z values (representing the whole data) are passed to panel.cloud for each panel.  subscripts specifies the subset of rows to be used for the particular panel.  
索引指定点来绘制。相同x,y和z值(占整个数据),每个小组通过panel.cloud。 subscripts指定将用于为特定的面板的行子集。


参数:groups
specification of a grouping variable, passed down from the high level functions.  
分组变量的规范,通过从高层次的功能。


参数:perspective
logical, whether to plot a perspective view. Setting this to FALSE is equivalent to setting distance to 0  
逻辑,无论是绘制透视图。此设置FALSE是相当于设置distance0


参数:distance
numeric, between 0 and 1, controls amount of perspective. The distance of the viewing point from the origin (in the transformed coordinate system) is 1 / distance. This is described in a little more detail in the documentation for cloud  
0和1之间,数值控制视角的金额。从原产地的观赏点的距离(在转换后的坐标系统)是1 / distance。这是文档中描述更详细一点cloud


参数:screen
A list determining the sequence of rotations to be applied to the data before being plotted. The initial position starts with the viewing point along the positive z-axis, and the x and y axes in the usual position. Each component of the list should be named one of "x", "y" or "z" (repititions are allowed), with their values indicating the amount of rotation about that axis in degrees.  
列表被应用到之前绘制的数据确定的轮换顺序。初始位置开始,沿正z轴的观赏点,并在通常的位置的X和Y轴。列表中的每个组件应该被命名为"x","y"或"z"(repititions允许)之一,他们表示金额的旋转轴,在度的值。


参数:R.mat
initial rotation matrix in homogeneous coordinates, to be applied to the data before screen rotates the view further.  
初始旋转矩阵的齐次坐标,被应用到前screen旋转视图进一步的数据。


参数:par.box
graphical parameters for box, namely, col, lty and lwd. By default obtained from the parameter box.3d.  
图形框,即山坳,LTY和LWD参数。默认情况下获得的参数box.3d。


参数:xlim, ylim, zlim
limits for the respective axes. As with other lattice functions, these could each be a numeric 2-vector or a character vector indicating levels of a factor.  
各轴的限制。至于与其他格功能,这些都可以是一个数字2向量或特征向量表示的一个因素水平。


参数:panel.3d.cloud, panel.3d.wireframe
functions that draw the data-driven part of the plot (as opposed to the bounding box and scales) in cloud and wireframe. This function is called after the "back" of the bounding box is drawn, but before the "front" is drawn.  Any user-defined custom display would probably want to change these functions. The intention is to pass as much information to this function as might be useful (not all of which are used by the defaults). In particular, these functions can expect arguments called xlim, ylim, zlim which give the bounding box ranges in the original data scale and xlim.scaled, ylim.scaled, zlim.scaled which give the bounding box ranges in the transformed scale. More arguments can be considered on request.  
功能,吸引cloud和wireframe图的数据驱动的一部分(相对于边界框和规模)。绘制边界框后的“后退”,但这个函数被调用前绘制的“前”。任何用户自定义显示,可能要更改这些功能。意图是通过尽可能多的信息,这个功能可能是有用的(不是所有这一切都是由默认)。特别是,这些功能都可以期望区域xlim,ylim,zlim给边界框范围,在原始数据的规模和xlim.scaled,ylim.scaled“的参数zlim.scaled给在转化的规模边界框范围。可以考虑要求更多的参数。


参数:aspect
aspect as in cloud  
cloud方面的


参数:xlab, ylab, zlab
Labels, have to be lists. Typically the user will not manipulate these, but instead control this via arguments to cloud directly.  
标签,必须列表。通常用户不会操作这些,而是控制通过cloud直接的参数此。


参数:xlab.default
for internal use   
供内部使用


参数:ylab.default
for internal use   
供内部使用


参数:zlab.default
for internal use   
供内部使用


参数:scales.3d
list defining the scales  
列出定义的尺度


参数:proportion
numeric scalar, gives the length of arrows as a proportion of the sides  
数字标量,使双方的比例为箭头的长度


参数:scpos
A list with three components x, y and z (each a scalar integer), describing which of the 12 sides of the cube the scales should be drawn. The defaults should be OK. Valid values are x: 1, 3, 9, 11; y: 8, 5, 7, 6 and z: 4, 2, 10, 12. (See comments in the source code of panel.cloud to see the details of this enumeration.)  
与X,Y,Z(每一个标量整数)三部分组成的列表,描述应提请立方体的12双方的尺度。默认值应该是确定的。有效的值是X:1,3,9,11,Y:8,5,7,6和z:4,2,10,12。 (见panel.cloud源代码中的注释看到此枚举的细节。)


参数:wireframe
logical, indicating whether this is a wireframe plot
逻辑,说明这是否是一个线框图


参数:drape
logical, whether the facets will be colored by height, in a manner similar to levelplot.  This is ignored if shade=TRUE.  
逻辑方面是否着色方式类似levelplot的身高。如果shade=TRUE这被忽略。


参数:at, col.regions, alpha.regions
deals with specification of colors when drape = TRUE in wireframe.  at can be a numeric vector, col.regions a vector of colors, and alpha.regions a numeric scalar controlling transparency.  The resulting behaviour is similar to levelplot, at giving the breakpoints along the z-axis where colors change, and the other two determining the colors of the facets that fall in between.  
与色彩规范的交易时,drape = TRUEwireframe。 at可以是一个数值向量,col.regions颜色的向量,alpha.regions数字标量控制透明度。由此产生的行为是类似levelplot,at沿Z轴的颜色改变断点,和其他两个方面之间的颜色决定。


参数:rot.mat
4x4 transformation matrix in homogeneous coordinates. This gives the rotation matrix combining the screen and R.mat arguments to panel.cloud  
4x4的变换矩阵的齐次坐标。这给人的旋转矩阵,结合screen和R.mat参数panel.cloud


参数:type
Character vector, specifying type of cloud plot. Can include one or more of "p", "l", "h" or "b". "p" and "l" mean "points" and "lines" respectively, and "b" means "both".  "h" stands for "histogram", and causes a line to be drawn from each point to the X-Y plane (i.e., the plane representing z = 0), or the lower (or upper) bounding box face, whichever is closer.  
特征向量,指定类型的云积。可以包括一个或多个"p","l","h"或"b"。 "p"和"l"的意思是“点”和“线”,分别和"b"手段都。 "h"代表的“直方图”,导致要绘制从每个点到XY平面(即飞机代表z = 0),或低于(或上)边界框的脸线,两者是密切。


参数:xlim.scaled, ylim.scaled, zlim.scaled
axis limits (after being scaled to the bounding box)   
限制轴(后扩展到边界框)


参数:zero.scaled
z-axis location (after being scaled to the bounding box) of the X-Y plane in the original data scale, to which lines will be dropped (if within range) from each point when type = "h"  
在原始数据的规模XY平面的Z轴位置(后扩展到边界框),哪条线路将被丢弃(如果范围内)从每个点的时候type = "h"


参数:cross
logical, defaults to TRUE if pch = "+". panel.3dscatter can represent each point by a 3d "cross" of sorts (it's much easier to understand looking at an example than from a description). This is different from the usual pch argument, and reflects the depth of the points and the orientation of the axes. This argument indicates whether this feature will be used.  This is useful for two reasons. It can be set to FALSE to use "+" as the plotting character in the regular sense. It can also be used to force this feature in grouped displays.  
逻辑,默认TRUE如果pch = "+"。 panel.3dscatter可以代表每个点由一个三维交叉排序(它更容易理解在寻找一个比一个描述的例子)。这是平常的的pch参数不同,反映了该点的深度和轴的方向。这个参数表示是否将使用此功能。这是有用的,原因有两个。它可以设置FALSE使用"+"图在常规意义上的字符。它也可以用来强制在分组显示功能。


参数:shade
logical, indicating whether the surface is to be colored using an illumination model with a single light source  
逻辑,说明是否在表面上是用一个单一的光源光照模型进行着色


参数:shade.colors.palette
a function (or the name of one) that is supposed to calculate the color of a facet when shading is being used. Three pieces of information are available to the function: first, the cosine of the angle between the incident light ray and the normal to the surface (representing foreshortening); second, the cosine of half the angle between the reflected ray and the viewing direction (useful for non-Lambertian surfaces); and third, the scaled (average) height of that particular facet with respect to the total plot z-axis limits.  All three numbers should be between 0 and 1. The shade.colors.palette function should return a valid color. The default function is obtained from the trellis settings.  
一个函数(或一个名字),应该计算的阴影正在使用时面的颜色。三件的信息是可用的功能:第一,入射光线和正常的表面(即透视)之间的角度的余弦值;第二,半之间的反射光的角度和观察方向余弦(非朗伯表面有用);第三,规模(平均),特别是Z轴限制的总积面的高度。所有这三个数字应该是0和1之间。 shade.colors.palette函数应该返回一个有效的颜色。默认功能是从网格设置。


参数:light.source
a 3-vector representing (in cartesian coordinates) the light source. This is relative to the viewing point being (0, 0, 1/distance) (along the positive z-axis), keeping in mind that all observations are bounded within the [-0.5, 0.5] cube  
3向量代表(在直角坐标系)的光源。这是相对的收视点(0,0,1/distance)(沿正z轴),牢记界所有的意见,在[-0.5,0.5]立方体


参数:polynum
quadrilateral faces are drawn in batches of polynum at a time. Drawing too few at a time increases the total number of calls to the underlying grid.polygon function, which affects speed. Trying to draw too many at once may be unnecessarily memory intensive. This argument controls the trade-off.  
四边形面绘制分批polynum一次。绘制在一段时间太少,增加了来电总数底层grid.polygon功能,从而影响速度。试图利用一次太多,可能是不必要的内存密集型。此参数控制的权衡。


参数:col.groups
colors for different groups
颜色为不同的群体


参数:col, col.point, col.line, lty, lwd, cex, pch, alpha
Graphical parameters.  Some other arguments (such as lex for line width) may also be passed through the ... argument.  
图形参数。一些其他参数(如lex线宽),也可以通过...参数。


参数:...
other parameters, passed down when appropriate
其他参数,传下来的,在适当的时候


参数:.scale
Logical flag, indicating whether x, y, and z should be assumed to be in the original data scale and hence scaled before being plotted.  x, y, and z are usually already scaled.  However, setting .scale=TRUE may be helpful for calls to panel.3dscatter and panel.3dwire in user-supplied panel functions.  
逻辑标志,指示是否x,y,z应假定为在原始数据的规模,因此被绘制前缩小。 x,y,z通常已经缩小。然而,设置.scale=TRUE可能有助于panel.3dscatter和panel.3dwire用户提供面板功能的调用。


参数:identifier
A character string that is prepended to the names of grobs that are created by this panel function.  
一个字符串,前面的名称,由本面板功能创建的grobs。


Details

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

These functions together are responsible for the content drawn inside each panel in cloud and wireframe. panel.wireframe is a wrapper to panel.cloud, which does the actual work.
这些功能结合在一起,是为每个面板内绘制cloud和wireframe的内容负责。 panel.wireframe是的panel.cloud,不实际工作的包装。

panel.cloud is responsible for drawing the content that does not depend on the data, namely, the bounding box, the arrows/scales, etc. At some point, depending on whether wireframe is TRUE, it calls either panel.3d.wireframe or panel.3d.cloud, which draws the data-driven part of the plot.
panel.cloud是负责绘制的内容,不依赖于数据,即边界框,箭头/规模等,在一些点上取决于是否wireframe是TRUE,调用panel.3d.wireframe或panel.3d.cloud,绘制的数据驱动的部分图。

The arguments accepted by these two functions are different, since they have essentially different purposes. For cloud, the data is unstructured, and x, y and z are all passed to the panel.3d.cloud function. For wireframe, on the other hand, x and y are increasing vectors with unique values, defining a rectangular grid. z must be a matrix with length(x) * length(y) rows, and as many columns as the number of groups.
这两个函数接受的参数是不同的,因为它们有本质的不同用途。为云,数据是非结构化的,x,y和z都传递给panel.3d.cloud功能。另一方面,为线框,x和y增加具有独特价值的向量,定义一个矩形网格。 z必须是一个length(x) * length(y)行,并为多组数列的矩阵。

panel.3dscatter is the default panel.3d.cloud function. It has a type argument similar to panel.xyplot, and supports grouped displays. It tries to honour depth ordering, i.e., points and lines closer to the camera are drawn later, overplotting more distant ones. (Of course there is no absolute ordering for line segments, so an ad hoc ordering is used. There is no hidden point removal.)
panel.3dscatter默认panel.3d.cloud功能。它有一个type参数类似panel.xyplot,并支持分组显示。试图荣誉深度排序,即,点和线接近相机后得出,overplotting更遥远的。 (线段当然也没有绝对的顺序,这样一个特设的顺序使用。有没有隐藏点去除。)

panel.3dwire is the default panel.3d.wireframe function. It calculates polygons corresponding to the facets one by one, but waits till it has collected information about polynum facets, and draws them all at once. This avoids the overhead of drawing grid.polygon repeatedly, speeding up the rendering considerably. If shade = TRUE, these attempt to color the surface as being illuminated from a light source at light.source. palette.shade is a simple function that provides the deafult shading colors
panel.3dwire默认panel.3d.wireframe功能。计算多边形方面逐一对应,但等待,直到它已收集了polynum方面的信息,并提请他们一次全部。这就避免了绘制grid.polygon反反复复,加快渲染相当的开销。如果shade = TRUE,表面颜色从光源照射在light.source这些企图。 palette.shade是一个简单的功能,提供的deafult的底纹颜色

Multiple surfaces are drawn if groups is non-null in the call to wireframe, however, the algorithm is not sophisticated enough to render intersecting surfaces correctly.
groups是wireframe,然而,该算法不复杂,足以使相交表面正确的调用非空,多个曲面绘制。


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


Deepayan Sarkar <a href="mailtoeepayan.Sarkar@R-project.org">Deepayan.Sarkar@R-project.org</a>



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

cloud, utilities.3d
cloud,utilities.3d

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-24 08:44 , Processed in 0.022926 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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