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

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

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

                                         Ordination Plot with Movable Labels
                                         移动标签的排序图

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

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

Function orditkplot produces an editable ordination plot with points and labels. The labels can be moved with mouse, and the edited plot can be saved as an encapsulated postscript file or exported via R  plot function to other graphical formats, or saved in the R session  for further processing.
功能orditkplot点和标签产生一个可编辑的排序图。标签可以用鼠标移动,和编辑的图可以保存为一个封装的PostScript文件或出口通过Rplot功能,其他图形格式,或保存在R会话进行进一步的处理。


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


orditkplot(x, display = "species", choices = 1:2, width, xlim, ylim,
   tcex = 0.8, tcol, pch = 1,  pcol, pbg, pcex = 0.7, labels,  ...)
## S3 method for class 'orditkplot'
plot(x, ...)
## S3 method for class 'orditkplot'
points(x, ...)
## S3 method for class 'orditkplot'
text(x, ...)
## S3 method for class 'orditkplot'
scores(x, display, ...)



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

参数:x
An ordination result or any other object that scores can handle, or for the plot function the object dumped from the interactive orditkplot session.
scores可以处理,或协调结果或任何其他对象plot函数对象的互动orditkplot会话倾倒。


参数:display
Type of scores displayed. For ordination scores this typically is either "species" or "sites", and for orditkplot result it is either "points" or "labels".
类型scores显示。对于协调的分数,这通常是是"species"或"sites",并orditkplot的结果是"points"或"labels"。


参数:choices
Axes displayed.
轴显示。


参数:width
Width of the plot in inches; defaults to the current width of the graphical device.  
图英寸的宽度,默认的图形设备的当前宽度。


参数:xlim, ylim
x and y limits for plots: points outside these limits will be completely removed.
图:超出这些限制的点的x和y的限制将被彻底清除。


参数:tcex
Character expansion for text labels.
字符扩展的文本标签。


参数:tcol
Colour of text labels.
文本标签的颜色。


参数:pch, pcol, pbg
Point type and outline and fill colours.  Defaults pcol="black"  and pbg="transparent".  Argument pbg has an effect only in filled plotting characters pch = 21 to 25.   
点型感和轮廓和填充颜色。默认值pcol="black"和pbg="transparent"。参数pbg的效果,只有在充满绘制字符pch = 21到25。


参数:pcex
Expansion factor for point size.   
点大小的膨胀系数。


参数:labels
Labels used instead of row names.
使用的标签,而不是行的名称。


参数:...
Other arguments passed to the function. These can be graphical parameters (see par) used in the plot, or extra arguments to scores. These arguments are ignored in plot, but honoured in text and points.   
其他参数传递给函数。这些可以是图形的参数(见par)中的图,或额外的参数给scores。这些参数将被忽略在plot,但在text和points荣幸。


Details

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

Function orditkplot uses tcltk package to draw Tcl/Tk based ordination graphics with points and labels. The function opens an editable canvas with fixed points, but the labels can be dragged with mouse to better positions or edited. In addition, it is possible to zoom to a part of the graph.
功能orditkplot使用tcltk包基于Tcl / Tk的协调图形画点和标签。该函数打开一个可编辑的帆布与固定点,但可以用鼠标拖动到更好的位置或编辑的标签。此外,它是可能的,以放大的曲线图的一部分。

The function knows the following mouse operations:
该函数知道下面的鼠标操作:

<STRONG>Left mouse button</STRONG> can be used to move labels to better positions. A line will connect a label to the corresponding point.
<STRONG>鼠标左键</ STRONG>可以使用移动的标签,更好的位置。 A线将连接标签的对应点。

<STRONG>Double clicking left mouse button</STRONG> opens a window where the label can be edited. After editing the label, hit the Return key.
<STRONG>双击鼠标左键</ STRONG>打开一个窗口,可以编辑的标签。编辑标签后,按回车键。

<STRONG>Right mouse button</STRONG> (or alternatively, Shift-Mouse button with one-button mouse) can be used for zooming to a part of the graph. Keeping the mouse button down and dragging will draw a box of the zoomed area, and after releasing the button, a new plot window will be created (this is still preliminary: all arguments are not passed to the new plot).
<STRONG>鼠标右键</ STRONG>(或者,按住Shift键鼠标按键,一键式鼠标),可用于缩放的图形的一部分。按住鼠标按钮并拖动,绘制一个框的缩放区,并释放按钮后,将创建新的绘图窗口(这仍是初步的所有参数都不会传递到新的图形)。

In addition there are buttons for the following tasks: <STRONG>Copy to EPS</STRONG> copies the current plot to an encapsulated postscript (eps) file using standard Tcl/Tk utilities. The faithfulness of this copy is system dependent. Button <STRONG>Export plot</STRONG> uses plot.orditkplot function to redraw the plot into graphical file formats. Depending on the system, the following graphical formats may be available: eps, pdf, png, jpeg or bmp. The file type is deduced from the file suffix or the selection of the file type in the dialogue box. Alternatively, the same dialogue can be used to save the plot to an editable xfig file. Button <STRONG>Dump to R</STRONG> writes the edited coordinates of labels and points to the R session for further processing, and the plot.orditkplot function can be used to display the results. For faithful replication of the plot, the graph must have similar dimensions as the orditkplot canvas had originally. The plot function cannot be configured, but it uses the same settings as the original Tcl/Tk plot. However, points and text functions are fully configurable, and unaware of the original Tcl/Tk plot settings (probably you must set cex at least to get a decent plot). Finally, button <STRONG>Dismiss</STRONG> closes the window.
此外,还有一些按钮,用于执行以下任务:<STRONG>复制到EPS </ STRONG>到封装的PostScript(EPS)文件,使用标准的Tcl / Tk的实用程序会将当前的图。这个副本的忠诚取决于系统。按钮<STRONG>出口图</ STRONG>使用plot.orditkplot功能的重绘积成的图形文件格式。根据不同的系统,可能是下面的图形格式:EPS,PDF,PNG,JPEG或BMP格式。推导出的文件后缀或在对话方块中选择的文件类型的文件类型。另外,同样的对话,可以用来保存为可编辑的xfig文件的图。至R的按钮<STRONG>转储</ STRONG>编辑标签和点的坐标写入到R会话进行进一步的处理,并且可以用来显示结果plot.orditkplot功能。忠实复制的图,图形必须作为orditkplot帆布原来也有类似的尺寸。 plot功能不能被配置,但它使用相同的设置与原来的Tcl / Tk的图。然而,points和text功能是完全可配置的,不知道原来的Tcl / Tk的图设置(可能是您必须设置cex至少得到一个体面的图)。最后,按钮<STRONG>关闭</ STRONG>关闭窗口。

The produced plot will have equal aspect ratio. The width of the horizontal axis is fixed, but vertical axes will be scaled to needed height, and you can use scrollbar to move vertically if the whole canvas does not fit the window. If you use dumped labels in ordinary R plots, your plot must have the same dimensions as the orditkplot canvas to have identical location of the labels.
所生产的图都享有平等的纵横比。水平轴的宽度是固定的,但垂直轴将被调整到需要的高度,您可以使用滚动条上下移动,如果将整个画布不适合的窗口。如果您使用普通&#341;图倾销的标签,你的图必须具有相同的尺寸为orditkplot画布上的标签具有相同的位置。

The function only displays one set of scores. However, you can use ordipointlabel to produce a result object that has different points and text types for several sets of scores and this can further edited with orditkplot. For a good starting solution you need to scale the ordipointlabel result so that the points span over the whole horizontal axis.
该功能只显示一组的分数。然而,你可以使用ordipointlabel产生一个结果对象,有几组分数的不同点和文本类型,这样可以进一步编辑的orditkplot。对于一个良好的开端解决方案,你需要扩展ordipointlabel的结果,使整体水平轴点跨越。

The plot is a Tcl/Tk canvas, but the function tries to replicate standard graphical device of the platform, and it honours several graphical parameters (see par).  Many of the graphical parameters can be given on the command line, and they will be passed to the function without influencing other graphical devices in R. At the moment, the following graphical parameters are honoured:  pch bg,  cex, cex.axis, cex.lab, col (for labels), col.axis, col.lab, family (for font faces), fg, font, font.axis, font.lab, lheight, lwd (for the box), mar, mex, mgp, ps, tcl. These can be set with par, and they also will influence other plots similarly.
该图是一个Tcl / Tk画布,但该函数尝试复制标准的图形设备的平台,和它的几个图形参数(参见par)。许多的图形参数可以在命令行中,他们将被传递的功能,但不影响其他图形设备R.目前,感到非常荣幸下面的图形参数:pchbg ,cex,cex.axis,cex.lab,col(标签),col.axis,col.lab,family(字体),fg,font,font.axis,font.lab,lheight,lwd(盒),mar, mex,mgp,ps,tcl。这些都可以用par,他们也同样会影响其他图。

The tkcanvas text cannot be rotated, and therefore vertical axis is not labelled, and las parameter will not be honoured in the Tcl/Tk plot, but it will be honoured in the exported R plots and in
tkcanvas文本不能旋转,垂直轴标记,和las兑现par:ameter将在Tcl / Tk的图,但它会被荣幸的出口&#341;的图和


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

Function returns nothing useful directly, but you can save the edited graph to a file or dump the edited positions to an R session for further processing and plotting.  
函数返回任何有用的,但你可以保存到一个文件中编辑的图形编辑的位置,倾倒的R会话进一步处理和绘图。


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

You need tcltk package and R must have been configured with capabilities for tcltk when building the binary. Depending on your OS, you may need to start X11 and set the display before loading tcltk and starting the function (for instance, with Sys.setenv("DISPLAY"=":0")). See tcltk-package.
您需要tcltk包和R必须已经配置了capabilitiestcltk建设的二进制。根据您的操作系统,您可能需要启动X11并设置显示加载tcltk和启动功能(例如,与Sys.setenv("DISPLAY"=":0"))。见tcltk-package。


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


Jari Oksanen



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

Function ordipointlabel is an automatic procedure with similar goals of avoiding overplotting.             See ordiplot, plot.cca, ordirgl and orditorp for alternative ordination plots, and scores for extracting ordination
函数ordipointlabel是一个自动与类似避免overplotting目标程序。 ordiplot,plot.cca,ordirgl和orditorp替代的协调图,和scores提取协调


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


## The example needs user interaction and is not executed directly.[#例如需要用户交互,并没有直接执行。]
## It should work when pasted to the window.[#粘贴到窗口时,它应该工作。]
## Not run: [#不运行:]
data(varespec)
ord <- cca(varespec)
## Do something with the graph and end by clicking "Dismiss"[#做一些图形和结束,点击“解散”]
orditkplot(ord, mar = c(4,4,1,1)+.1, font=3)
## Use ordipointlabel to produce a plot that has both species and site[使用ordipointlabel产生一个图,物种和网站]
## scores in different colors and plotting symbols[#分数不同的颜色和符号绘制]
pl <- ordipointlabel(ord)
orditkplot(pl)

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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 02:49 , Processed in 0.029668 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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