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

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

[复制链接]
发表于 2012-10-1 15:09:45 | 显示全部楼层 |阅读模式
ordiplot3d(vegan)
ordiplot3d()所属R语言包:vegan

                                        Three-Dimensional and Dynamic Ordination Graphics
                                         三维图形和动态协调

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

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

Function ordiplot3d displays three-dimensional ordination graphics using scatterplot3d.  Function ordirgl displays three-dimensional dynamic ordination graphs which can be rotated and zoomed into using rgl package. Both work with all ordination results form vegan and all ordination results known by scores function.
功能ordiplot3d显示三维的协调,显卡采用了scatterplot3d。函数ordirgl显示三维动态协调图形可以旋转和缩放到使用rgl包。它们的工作原理与所有的协调结果形式vegan和所有已知的协调结果scores函数。


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


ordiplot3d(object, display = "sites", choices = 1:3, ax.col = 2,
        arr.len = 0.1, arr.col = 4, envfit, xlab, ylab, zlab, ...)
ordirgl(object, display = "sites", choices = 1:3, type = "p",
        ax.col = "red", arr.col = "yellow", text, envfit, ...)
orglpoints(object, display = "sites", choices = 1:3, ...)
orgltext(object, text, display = "sites", choices = 1:3, justify = "center",
        adj = 0.5, ...)
orglsegments(object, groups, display = "sites", choices = 1:3, ...)
orglspider(object, groups, display = "sites", w = weights(object, display),
        choices = 1:3, ...)



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

参数:object
An ordination result or any object known by scores.  
协调结果或任何对象的scores。


参数:display
Display "sites" or "species" or other ordination object recognized by scores.  
显示"sites"或"species"或其他协调认可的scores的对象。


参数:choices
Selected three axes.  
选择三个轴。


参数:arr.len
'Length' (width) of arrow head passed to arrows function.  
“长度”(宽)传递给arrows功能的箭头。


参数:arr.col
Colour of biplot arrows and centroids of environmental variables.  
颜色的双标图arrows和重心的环境变量。


参数:type
The type of plots: "p" for points or "t" for text labels.
图的类型:"p"点或"t"的文本标签。


参数:ax.col
Axis colour (concerns only the crossed axes through the origin).
轴颜色(仅涉及交叉轴通过原点)。


参数:text
Text to override the default with type =     "t".
默认情况下,type =     "t"文字覆盖。


参数:envfit
Fitted environmental variables from envfit displayed in the graph.
合身的环境变量envfit在图表中显示。


参数:xlab, ylab, zlab
Axis labels passed to scatterplot3d. If missing, labels  are taken from the ordination result. Set to NA to suppress labels.  
轴标签传递给scatterplot3d。如果缺少,标签被从协调结果。设置为NA,压制标签。


参数:justify, adj
Text justification passed to rgl.texts. One of these is used depending on the version of rgl installed.
文字传递给rgl.texts的理由。其中之一是根据rgl安装的版本。


参数:groups
Factor giving the groups for which the graphical item is drawn.
因素给组的图形绘制。


参数:w
Weights used to find the average within group. Weights are used automatically for cca and decorana results, unless undone by the user. w=NULL sets equal weights to all points.  
采用的权数,以找到在组内的平均。权重用于自动cca和decorana结果,除非用户撤消。 w=NULL的所有点设置相同的权重。


参数:...
Other parameters passed to graphical functions.  
其他参数传递给图形功能。


Details

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

Both function display three-dimensional ordination graphics. Function ordiplot3d plots static scatter diagrams using scatterplot3d. Function ordirgl plots dynamic graphics using OpenGL  in rgl. Both functions use most default settings of underlying graphical functions, and you must consult their help pages to change graphics to suit your taste (see scatterplot3d, rgl, rgl.points,rgl.texts). Both functions will display only one selected set of scores, typically either "sites" or "species", but for instance cca also has "lc" scores. In constrained ordination (cca, rda, capscale), biplot arrows and centroids are always displayed similarly as in two-dimensional plotting function plot.cca.  Alternatively, it is possible to display fitted environmental vectors or class centroids from envfit in both graphs.  These are displayed similarly as the results of constrained ordination, and they can be shown only for non-constrained ordination. The user must remember to specify at least three axes in envfit if the results are used with these functions.
这两个功能显示三维协调的图形。功能ordiplot3d图静态的散点图使用scatterplot3d。函数ordirgl图动态图形用OpenGL在rgl的。这两个函数使用最底层图形功能的默认设置,你必须咨询他们的帮助页面,以改变图形,以满足您的口味(见scatterplot3d,rgl,rgl.points,rgl.texts )。这两个函数将只显示一个选择的scores,通常是"sites"或"species",但例如cca也有"lc"分数。在受约束的协调(cca,rda,capscale),双标图箭头和质心总是显示同样作为二维绘图功能plot.cca的。或者,也能够从显示拟合的的环境向量或类重心envfit在两个曲线图。这些都显示同样的约束的协调结果,并且它们可以仅示出用于非约束协调。 ,用户必须记住指定至少三个轴,在envfit,如果使用这些功能的结果。

Function ordiplot3d plots only points. However, it returns invisibly an object inheriting from ordiplot so that you can use identify.ordiplot to identify "points" or "arrows". The underlying scatterplot3d function accepts type = "n" so that only the axes, biplot arrows and centroids of environmental variables will be plotted, and the ordination scores can be added with text.ordiplot or points.ordiplot. Further, you can use any functions from the ordihull family with the invisible result of ordiplot3d, but you must remember to specify the display as "points" or "arrows". To change the viewing angle, orientation etc. you must see scatterplot3d. Only one kind of scores will be plotted.  See Examples for plotting both species and site scores.
功能ordiplot3d只绘制点。然而,它返回不可见的对象继承自ordiplot这样你可以使用identify.ordiplot确定"points"或"arrows"。的基本scatterplot3d函数接受type = "n"因此,只有轴,的双标图箭头和质心的环境变量将被绘制,被添加text.ordiplot或points.ordiplot,统筹分数。此外,您可以使用任何功能ordihull家庭与无形的ordiplot3d,但你必须记住,指定display"points"或"arrows" 。要改变观看角度,方向等,你必须看到scatterplot3d。只有一种分数将被绘制。示例,请参见绘制物种和现场评分。

Function ordigl makes a dynamic three-dimensional graph that can be rotated with mouse, and zoomed into with mouse buttons or wheel (but Mac users with one-button mouse should see rgl.viewpoint), or try ctrl-button. MacOS X users must start X11 before calling rgl commands. Function ordirgl uses default settings, and you should consult the underlying functions  rgl.points, rgl.texts to see how to control the graphics. Function ordirgl always cleans its graphic window before drawing.  Functions orglpoints adds points and orgltext adds text to existing ordirgl windows.  In addition, function orglsegments combines points within "groups" with line segments similarly as ordisegments. Function orglspider works similarly as ordispider: it connects points to their weighted centroid within "groups", and in constrained ordination it can connect "wa" or weighted averages scores to corresponding "lc" or linear combination scores if "groups" is missing. In addition, basic rgl functions  rgl.points, rgl.texts, rgl.lines and many others can be used.
函数ordigl一个动态的三维图形,用鼠标可以旋转,放大到与鼠标的按键或滚轮(但Mac用户提供了一键式鼠标应该看到rgl.viewpoint),或尝试CTRL按钮。 MacOS X系统的用户必须启动X11,然后再调用rgl命令。函数ordirgl使用默认设置,您应该咨询的基本功能rgl.points,rgl.texts来看看如何控制图形。功能ordirgl总是清除之前绘制的图形窗口。功能orglpoints添加点和orgltext将文本添加到现有ordirgl窗口。在此外,功能orglsegments的结合点在"groups"用直线段的类似于ordisegments。函数orglspider的工作方式类似于ordispider:连接点,其加权质心内"groups",并在受约束的协调,可以连接"wa"或加权平均分数相应的<X >或线性组合"lc"如果缺少得分。此外,基本的"groups"函数rgl,rgl.points,rgl.texts和许多其他可以使用。


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

Function ordiplot3d returns invisibly an object of class "ordiplot3d" inheriting from ordiplot. The return object will contain the coordinates projected onto two dimensions for points, and the projected coordinates of origin, and possibly the projected coordinates of the heads of arrows and centroids of environmental variables. Functions like identify.ordiplot, points.ordiplot, text.ordiplot can use this result, as well as ordihull and other functions documented with the latter. The result will also contain the object returned by scatterplot3d, including function xyz.convert which projects three-dimensional coordinates onto the plane used in the current plot (see Examples). In addition, there is a function envfit.convert that projects a three-dimensional envfit object to the current plot.
功能ordiplot3d返回不可见的类"ordiplot3d"继承ordiplot的对象。返回的对象将包含的坐标投影到两个尺寸points,投影坐标的origin,可能是投影坐标的头arrows和centroids环境变量。功能,如identify.ordiplot,points.ordiplot,text.ordiplot可以利用这个结果,以及ordihull后者记录等功能。其结果也将包含返回的对象scatterplot3d,包括功能xyz.convert项目的三维坐标到平面在当前的图(见例)。此外,有一个函数envfit.convert,将投影用三维envfit对象在当前图。

Function ordirgl returns nothing.
功能ordirgl没有返回值。


警告----------Warning----------

Function ordirgl uses OpenGL package rgl which may not be functional in all platforms, and can crash R in some: use save.image before trying ordirgl. Mac users must start X11 (and first install X11 and some other libraries) before being able to use rgl. It seems that rgl.texts does  not always position the text like supposed, and it may be safe to verify text location with corresponding points.
功能ordirgl使用OpenGL包rgl这可能不是在所有平台上的功能,并能崩溃R在一些:使用save.image,然后再尝试ordirgl。 Mac用户必须从X11(第一安装X11和其他一些库)可以使用rgl之前。它似乎rgl.texts不总是定位文本类似应该,它可能是安全验证文本与对应点的位置。

Function ordiplot3d is based on scatterplot3d which does not allow exactly setting equal aspect ratio for axes.  The function tries to circumvent this by setting equal plotting ranges for all axes so that the plot should be a cube.  Depending on the dimensions of plotting device, this may fail, and the user should verify that the axes are approximately equal.
功能ordiplot3d是基于scatterplot3d不允许完全的轴设置等方面比。该函数试图绕过这个平等的绘制范围,使所有轴的图应该是一个立方体。根据绘图仪的尺寸,这可能会失败,并且用户应该验证的轴约等于。

Please note that scatterplot3d sets internally some graphical parameters (such as mar for margins) and does not honour default settings.  It is advisable to study carefully the documentation and examples of scatterplot3d.
请注意scatterplot3d内部设置的一些图形化的参数(如mar利润),不荣誉默认设置。可取的做法是要仔细研究的scatterplot3d的文档和例子。


注意----------Note----------

The user interface of rgl changed in version 0.65, but the ordirgl functions do not yet fully use the new capabilities.  However, they should work both in old and new versions of rgl.
rgl的用户界面改变在0.65版本中,但ordirgl功能也尚未充分利用的新功能。然而,他们应该在老版本和新版本的rgl。


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


Jari Oksanen



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

scatterplot3d, rgl, rgl.points, rgl.texts, rgl.viewpoint, ordiplot, identify.ordiplot,  text.ordiplot, points.ordiplot, ordihull, plot.cca, envfit.
scatterplot3d,rgl,rgl.points,rgl.texts,rgl.viewpoint,ordiplot,identify.ordiplot,text.ordiplot,points.ordiplot,ordihull,plot.cca,envfit。


实例----------Examples----------


## Examples are not run, because they need non-standard packages[#示例无法运行,因为它们需要非标包]
## 'scatterplot3d' and 'rgl' (and the latter needs user interaction).[#scatterplot3d“和”RGL“(后者需要用户交互)。]
#####[####]
### Default 'ordiplot3d'[##默认ordiplot3d“]
## Not run: [#不运行:]
data(dune)
data(dune.env)
ord <- cca(dune ~ A1 + Moisture, dune.env)
ordiplot3d(ord)
### A boxed 'pin' version[##A盒装脚版本]
ordiplot3d(ord, type = "h")
### More user control[##更多的用户控制]
pl <- ordiplot3d(ord, scaling = 3, angle=15, type="n")
points(pl, "points", pch=16, col="red", cex = 0.7)
### identify(pl, "arrows", col="blue") would put labels in better positions[##识别(PL,“箭头”,列=“蓝”)将在更好的位置上贴标签,]
text(pl, "arrows", col="blue", pos=3)
text(pl, "centroids", col="blue", pos=1, cex = 1)
### Add species using xyz.convert function returned by ordiplot3d[##添加物种使用xyz.convert函数返回ordiplot3d]
sp <- scores(ord, choices=1:3, display="species", scaling=3)
text(pl$xyz.convert(sp), rownames(sp), cex=0.7, xpd=TRUE)
### Two ways of adding fitted variables to ordination plots[##合身的变量,以协调图的两种方法]
ord <- cca(dune)
ef <- envfit(ord ~ Moisture + A1, dune.env, choices = 1:3)
### 1. use argument 'envfit'[##1。请使用参数“envfit]
ordiplot3d(ord, envfit = ef)
### 2. use returned envfit.convert function for better user control[##2。使用的返回envfit.convert功能,更好的用户控制]
pl3 <- ordiplot3d(ord)
plot(pl3$envfit.convert(ef), at = pl3$origin)
### envfit.convert() also handles different 'choices' of axes[##envfit.convert()也能处理不同的“选择”轴]
pl3 <- ordiplot3d(ord, choices = c(1,3,2))
plot(pl3$envfit.convert(ef), at = pl3$origin)
### ordirgl[##ordirgl]
ordirgl(ord, size=2)
ordirgl(ord, display = "species", type = "t")
rgl.quit()

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 02:47 , Processed in 0.020877 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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