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

R语言 spatstat包 plot.ppp()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 13:57:53 | 显示全部楼层 |阅读模式
plot.ppp(spatstat)
plot.ppp()所属R语言包:spatstat

                                        plot a Spatial Point Pattern
                                         绘制一个空间点模式

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

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

Plot a two-dimensional spatial point pattern
绘制一个两维空间点格局


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


## S3 method for class 'ppp'
plot(x, main, ..., chars=NULL, cols=NULL,
use.marks=TRUE, which.marks=1, add=FALSE,
maxsize=NULL, markscale=NULL,zap=0.01)



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

参数:x
The spatial point pattern to be plotted. An object of class "ppp", or data which can be converted into  this format by as.ppp().  
要绘制的空间点格局。一个目的类"ppp",或数据,可被转化成这种格式as.ppp()。


参数:main
text to be displayed as a title above the plot.  
要显示的文本作为一个以上职称的图。


参数:...
extra arguments that will be passed to the plotting functions plot.default, points and/or symbols.  
额外的参数将被传递给绘图功能plot.default,points和/或symbols。


参数:chars
plotting character(s) used to plot points.  
绘制字符(S)积点。


参数:cols
the colour(s) used to plot points.  
积点的颜色(S)。


参数:use.marks
logical flag; if TRUE, plot points using a different plotting symbol for each mark; if FALSE, only the locations of the points will be plotted, using points().  
逻辑标志;如果TRUE,积点使用不同的绘制每个标记符号;如果FALSE,只有在点的位置将被绘制,使用points(),。


参数:which.marks
Index determining which column of marks to use, if the marks of x are a data frame. A character string or an integer. Defaults to 1 indicating the first column of marks.  
指数确定使用哪个列的标记,如果标记的x是一个数据框。一个字符串或一个整数。默认为1指示标记的第一列。


参数:add
logical flag; if TRUE, just the points are plotted, over the existing plot. A new plot is not created, and the window is not plotted.  
逻辑标志,如果TRUE,只是点绘制,在现有的图。不会创建一个新的绘图,窗口不被绘制。


参数:maxsize
maximum size of the circles/squares plotted when x is a marked point pattern with  numerical marks. Incompatible with markscale.  
最大尺寸绘制的圆/平方x是一个显着的点的数值商标图案。不相容的markscale。


参数:markscale
physical scale factor determining the sizes of the circles/squares plotted when x is a marked point pattern with  numerical marks. Incompatible with maxsize.  
绘制的物理规模的决定因素大小的圆/平方x是一个标记点的数值商标图案。不相容的maxsize。


参数:zap
Fraction between 0 and 1. When x is a marked point pattern with numerical marks, zap is the smallest mark value (expressed as a fraction of the maximum possible mark) that will be plotted.  Any points which have marks smaller in absolute value than zap * max(abs(marks(x))) will not be plotted.  
0和1之间的分数。当x是一个显着的点模式的数值标记,zap是最小的标记值(表示为最大可能的标记的一小部分),将被绘制。任何点有标记的绝对值比zap * max(abs(marks(x)))不会被绘制。


Details

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

This is the plot method for  point pattern datasets (of class "ppp", see ppp.object).
这是plot方法的点模式数据集(类"ppp"中,看到ppp.object“)。

First the observation window x$window is plotted. Then the points themselves are plotted, in a fashion that depends on their marks, as follows.
首先,观察窗x$window绘制。然后,点本身绘制,在一个的方式依赖于他们的标记,如下所示。

If the point pattern does not have marks, or if use.marks = FALSE, then the locations of all points will be plotted  using a single plot character
如果点模式没有商标,或如果use.marks = FALSE,然后所有点的位置将被绘制在同一张图字符

If x$marks is a factor, then  each level of the factor is  represented by a different plot character.
如果x$marks是一个因素,然后每一级代表一个不同的图人物的因素。

If x$marks is a numeric vector, the marks are rescaled to the unit interval and each point is represented by a circle  with radius proportional to the rescaled mark (if the value is positive) or a square with side proportional to the absolute value of the rescaled mark (if the value is negative).
如果x$marks是一个数值向量,标记被重新调整的单元间隔,并正比于绝对与半径成比例的重新缩放标记(如果该值是正的),或正方形与侧的圆表示的每个点的重新缩放标记的值(如果该值是一个负数)。

If x$marks is neither numeric nor a factor, then each possible mark will be represented by a different plotting character. The default is to represent the ith smallest mark value by points(..., pch=i).
如果x$marks既不是数字,也不是一个因素,那么每一个可能的标记来表示不同的绘图字符。默认情况下是代表的ipoints(..., pch=i)个最小的标记值。

Plotting of the window x$window is performed by plot.owin. This plot may be modified  through the ... arguments. In particular the extra argument border determines the colour of the window.
绘制窗口x$window的是plot.owin。通过...参数可以修改该图。尤其是额外的参数border决定颜色的窗口。

Plotting of the points themselves is performed by the function points, except for the case of continuous marks, where it is performed by symbols. Their plotting behaviour may be modified through the ... arguments.
绘制点本身的功能points,除的情况下,连续的标志,它是由symbols。通过...参数可以修改他们的图行为。

The argument chars determines the plotting character or characters used to display the points (in all cases except for the case of continuous marks). For an unmarked point pattern, this should be a single integer or character determining a plotting character (see par("pch")). For a multitype point pattern, chars should be a vector of integers or characters, of the same length as levels(x$marks), and then the ith level or type  will be plotted using character chars[i].
的参数chars决定绘制一个或多个字符用来显示点,(除了连续标记的情况下,在任何情况下)。对于未标记的点模式,这应该是一个整数或字符确定绘图的字符(见par("pch")“)。对于一个多类型的点图案,chars应的整数或字符是一个向量,相同的长度levels(x$marks),然后i次级别或类型将被使用的字符绘制chars[i]。

If chars is absent, but there is an extra argument pch, then this will determine the plotting character for all points.
如果chars是不存在的,但有一个额外的参数pch,那么这将决定各点的绘制字符。

The argument cols determines the colour or colours used to display the points. For an unmarked point pattern, or a marked point pattern with continuous marks, this should be a character string determining a colour. For a multitype point pattern, cols should be a character vector, of the same length as levels(x$marks). The ith level or type will be plotted using colour cols[i].
cols的参数决定了用于显示点的颜色或颜色。对于一个没有标记的点格局,连续的标记或标记点模式,这应该是一个字符串,确定颜色。对于多类型的点模式,cols应该是一个字符向量,相同长度的levels(x$marks)。 i个级别或类型将被绘制使用颜色cols[i]。

If cols is absent, the colour used to plot all the points may be determined by the extra argument fg (for multitype point patterns) or the extra argument col (for all other cases). Note that col will also reset the colour of the window.
cols如果是不存在的,用于绘制所有的点的颜色来确定额外的参数fg下的多点模式或额外的参数col(所有其他情况下) 。注意,col也将重置窗口颜色。

The arguments maxsize and markscale  incompatible. They control the physical size of the circles and squares which represent the marks in a point pattern with continuous marks. If markscale is given, then a mark value of m is plotted as a circle of radius m * markscale (if m is positive) or a square of side abs(m) * markscale (if m is negative). If maxsize is given, then the largest mark in absolute value, mmax=max(abs(x$marks)), will be scaled to have physical size maxsize.
的参数maxsize和markscale不兼容的。它们控制的圆和正方形代表具有连续标志的点图案中的标记的物理尺寸。如果markscale,m标记值绘制一个圆的半径m * markscale(m是积极的)或方形侧abs(m) * markscale (m是负)。如果maxsize,然后在绝对值最大的标志,mmax=max(abs(x$marks)),将扩展到物理尺寸maxsize。

The user can set the default values of these plotting parameters using spatstat.options("par.points").
用户可以使用spatstat.options("par.points")设置的这些图参数的默认值。

To zoom in (to view only a subset of the point pattern at higher magnification), use the graphical arguments xlim and ylim to specify the rectangular field of view.
放大(查看只有在更高的放大倍率点模式的一个子集),使用图形化的参数xlim和ylim到指定的矩形视野。

The value returned by this plot function can be used to make a suitable legend, as shown in the examples.
返回的值由该图的功能可以用来做一个合适的传说,所示的例子。


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

NULL, or a vector giving the correspondence between  mark values and plotting characters.
NULL,或一个向量,标记值和绘图字符之间的对应关系。


除去该图周围的空白区域----------Removing White Space Around The Plot----------

A frequently-asked question is: How do I remove the white space around the plot? Currently plot.ppp uses the base graphics system of R, so the space around the plot is controlled by parameters  to par. To reduce the white space, change the parameter mar. Typically, par(mar=rep(0.5, 4)) is adequate, if there are no annotations or titles outside the window.
一个经常问的问题是:我如何删除周围的空白的图吗?目前plot.ppp使用基本的图形系统的R,所以周围的空间的图是由参数控制到par。为了减少白色空间,改变参数mar。通常情况下,par(mar=rep(0.5, 4))是足够的,如果没有注释或标题窗外。


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


Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>




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

iplot, ppp.object, plot, par, points, plot.owin, symbols
iplot,ppp.object,plot,par,points,plot.owin,symbols


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


   data(cells)
   plot(cells)

   plot(cells, pch=16)

   # make the plotting symbols larger (for publication at reduced scale)[大的绘图符号(按比例缩小)出版]
   plot(cells, cex=2)

   # set it in spatstat.options[在spatstat.options]
   oldopt <- spatstat.options(par.points=list(cex=2))
   plot(cells)
   spatstat.options(oldopt)

   # multitype [多类型]
   data(lansing)
   plot(lansing)

   # marked by a real number[标记由一个实数]
   data(longleaf)
   plot(longleaf)

   # just plot the points[绘制点]
   plot(longleaf, use.marks=FALSE)
   plot(unmark(longleaf)) # equivalent[当量]

   # controlling COLOURS of points[控制点的COLOURS]
   plot(cells, cols="blue")
   plot(lansing, cols=c("black", "yellow", "green",
                        "blue","red","pink"))
   plot(longleaf, fg="blue")

   # make window purple[窗口紫色]
   plot(lansing, border="purple")
   # make everything purple[让一切紫色]
   plot(lansing, border="purple", cols="purple", col.main="purple")

   # controlling PLOT CHARACTERS[控制PLOT性状的]
   plot(lansing, chars = 11:16)
   plot(lansing, chars = c("o","h","m",".","o","o"))

   # controlling MARK SCALE[控制MARK规模]
   plot(longleaf, markscale=0.1)

   # draw circles of DIAMETER equal to nearest neighbour distance[绘制圆的直径等于最近邻距离]
   plot(cells %mark% nndist(cells), markscale=1/2)

   # making the legend[的传说]
   data(amacrine)
   v <- plot(amacrine)
   legend(0.2, 1.2, pch=v, legend=names(v))

   # point pattern with multiple marks[多个标记点模式]
   data(finpines)
   plot(finpines, which.marks="height")

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-16 16:26 , Processed in 0.022940 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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