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

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

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

                                        Plot a Spatial Window
                                         绘制一个空间窗口

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

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

Plot a two-dimensional window of observation for a spatial point pattern
绘制观察空间点图案的一个二维窗口


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


## S3 method for class 'owin'
plot(x, main, add=FALSE, ..., box, edge=0.04,
                      hatch=FALSE, angle=45, spacing=diameter(x)/50,
                      invert=FALSE)



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

参数:x
The window to be plotted. An object of class owin, or data which can be converted into  this format by as.owin().  
要绘制的窗口。一个目的类owin,或数据,可被转化成这种格式as.owin()。


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


参数:add
logical flag: if TRUE, draw the window in  the current plot; if FALSE, generate a new plot.  
逻辑标志:如果TRUE,在当前绘图绘制窗口;如果FALSE,生成一个新的图。


参数:...
extra arguments passed to the generic plot function.  
额外的参数传递的通用plot功能。


参数:box
logical flag; if TRUE, plot the enclosing rectangular box  
逻辑标志,如果TRUE,绘制封闭的矩形框


参数:edge
nonnegative number; the plotting region will have coordinate limits that are 1 + edge times as large as the limits of the rectangular box that encloses the pattern.  
非负数;绘图区域将有坐标限制1 + edge倍大的矩形框包围的图案的限制。


参数:hatch
logical flag; if TRUE, the interior of the window will be shaded by a grid of parallel lines.  
逻辑标志,如果TRUE,内部的窗口将显示为灰色的平行线一格。


参数:angle
orientation of the shading lines (in degrees anticlockwise from the x axis) when hatch=TRUE.  
方向的阴影线(在x轴度逆时针)时hatch=TRUE。


参数:spacing
spacing between the shading lines, when hatch=TRUE.  
阴影线之间的间距,当hatch=TRUE。


参数:invert
logical flag; when the window is a binary pixel mask, the mask colours will be inverted if invert=TRUE.  
逻辑标志,当窗口是一个二进制像素面具,面具的颜色将被反转,如果invert=TRUE。


Details

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

This is the plot method for the class owin. The action is to plot the boundary of the window on the current plot device, using equal scales on the x and y axes.
这是plot方法的类owin。该行动是对当前的打印设备,使用x和y轴平等的尺度上绘制窗口边界。

If the window x is of type "rectangle" or "polygonal", the boundary of the window is plotted as a polygon or series of polygons. If x is of type "mask"  the discrete raster approximation of the window is displayed as a binary image (white inside the window, black outside).
如果该窗口x的类型是"rectangle"或"polygonal",在窗口的边界被绘制为一个多边形或一系列的多边形。如果x是类型"mask"的离散栅格近似的窗口显示为一个二进制图像(白色的窗口内,外黑)。

Graphical parameters controlling the display (e.g. setting the colours) may be passed directly via the ... arguments, or indirectly reset using  spatstat.options.
通过...参数,控制显示(例如,设置颜色)的图形参数直接传递或间接复位spatstat.options。

When x is of type "rectangle" or "polygonal", it is plotted by the R function polygon. To control the appearance (colour, fill density, line density etc) of the polygon plot, determine the required argument of polygon and pass it through ... For example, to paint the interior of the polygon in red, use the argument col="red". To draw the polygon edges in green, use border="green". To suppress the drawing of polygon edges, use border=NA.
当x是类型"rectangle"或"polygonal",它绘制的R功能polygon。要控制的多边形图的外观(颜色,填充密度,线密度等),确定所需的参数polygon并把它传递通过...例如,画多边形内部的红色,使用参数col="red"。要绘制的多边形边的绿色,使用border="green"。为了抑制绘制多边形的边,使用border=NA。

When x is of type "mask", it is plotted by image.default. The appearance of the image plot can be controlled by passing arguments to image.default through .... The default appearance can also be changed by setting the parameter par.binary of spatstat.options.
当x是的类型"mask",,绘制image.default。图像绘图的外观可以通过传递参数给image.default通过...。默认的外观也可以改变设置的参数par.binaryspatstat.options。

To zoom in (to view only a subset of the window at higher magnification), use the graphical arguments xlim and ylim to specify the desired rectangular field of view. (The actual field of view may be larger, depending on the graphics device).
放大(只查看窗口的一个子集,在更高的放大倍率),使用图形化的参数xlim和ylim到指定所需的矩形视野。 (实际视场的可能较大,取决于在图形设备上)。


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

none.
没有。


与孔填充多边形的注意事项----------Notes on Filled Polygons with Holes----------

The function polygon can only handle polygons without holes. To plot polygons with holes in a solid colour, we have implemented two workarounds.
函数polygon只能处理无孔的多边形。要绘制的多边形孔在一个坚实的颜色,我们已经实现了两个解决方法。

The first workaround uses the relatively new function polypath which does have the capability to handle polygons with holes. However, not all graphics devices support polypath. The older devices xfig and pictex do not support polypath. On a Windows system, the default graphics device windows supports polypath. On a Linux system, the default graphics device X11(type="Xlib") does not support polypath but X11(type="cairo") does support it. See X11 and the section on Cairo below.
第一个解决方法使用相对较新的功能polypath有能力处理的多边形孔。然而,并非所有的图形设备的支持polypath。的旧设备xfig和pictex不支持polypath。在Windows系统上,显卡的默认设备windows支持polypath。在Linux系统中,显卡的默认设备X11(type="Xlib")不支持polypath但X11(type="cairo")不支持它。见X11和开罗以下的部分。

The other workaround requires use of the gpclib package which effects a triangulation of the polygonal window in question which in turn permits the plotting of the window, filled with a solid colour, without filling the holes.  Type licence.polygons() for information about the licence under which gpclib operates. To make use of this workaround you need to have the packagegpclib installed and to set spatstat.options(gpclib=TRUE) (and to be working under circumstances permitted by the gpclib licence).
其他的解决方法需要使用的gpclib包,一个三角的多边形窗口的问题,又允许的绘图窗口,用纯色填充,而填充孔的影响。输入licence.polygons()下,gpclib经营许可证的信息。要使用此变通办法,你需要安装packagegpclib的设置spatstat.options(gpclib=TRUE)(和gpclib许可证允许的情况下)。


在Linux系统上的Cairo图形----------Cairo graphics on a Linux system----------

Linux systems support the graphics device X11(type="cairo") (see X11) provided the external library cairo is installed on the computer. See http://www.cairographics.org/download for instructions on obtaining and installing cairo.  After having installed cairo one needs to re-install R from source so that it has cairo capabilites.  To check whether your current installation of R has cairo capabilities, type (in R) capabilities()["cairo"]. The default type for X11 is controlled by X11.options. You may find it convenient to make cairo the default, e.g. via your .Rprofile. The magic incantation to put into .Rprofile is
Linux系统支持的图形设备X11(type="cairo")(见X11)提供了外部库cairo已安装在电脑上。请参阅http://www.cairographics.org/download获取和安装cairo的说明。安装后cairo需要重新安装R源,因此,它有cairo满足您。要检查是否您的当前安装的Rcairo功能,类型(R)capabilities()["cairo"]。的默认类型X11控制X11.options。您可能会发现它方便cairo默认情况下,例如:通过您的.Rprofile。神奇的咒语投入.Rprofile


(作者)----------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----------

owin.object, plot.ppp, polygon, image.default, spatstat.options
owin.object,plot.ppp,polygon,image.default,spatstat.options


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


  # rectangular window[矩形窗]
   data(nztrees)
   plot(nztrees$window)
   abline(v=148, lty=2)

  # polygonal window[多边形窗口]
  data(demopat)
  w <- demopat$window
  plot(w)
  plot(w, col="red", border="green", lwd=2)
  plot(w, hatch=TRUE, lwd=2)

  # binary mask[二进制掩码]
  we <- as.mask(erosion(w, 400, FALSE))
  plot(we)
  op <- spatstat.options(par.binary=list(col=grey(c(0.5,1))))
  plot(we)
  spatstat.options(op)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-16 00:22 , Processed in 0.029038 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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