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

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

[复制链接]
发表于 2012-9-30 00:00:50 | 显示全部楼层 |阅读模式
plot.mask(secr)
plot.mask()所属R语言包:secr

                                         Plot Habitat Mask or Density Surface
                                         图人居面膜或密度表面

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

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

Plot a habitat mask either as points or as an image plot. Colours maybe used to show the value of one mask covariate.
绘制的栖息地屏蔽点或image图。颜色可能用来显示一个面具协的价值。


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


## S3 method for class 'mask'
plot(x, border = 20, add = FALSE, covariate = NULL, axes = FALSE,
    dots = TRUE, col = "grey", breaks = 12, meshcol = NA, ppoly = TRUE,
    polycol = "red", ...)

## S3 method for class 'Dsurface'
plot(x, covariate = "D", group = NULL, plottype =
    "shaded", scale = 1, ...)

spotHeight (object, prefix = NULL, dec = 2, point = FALSE, text = TRUE,
    sep = ", ",  session = 1, scale = 1, ...)




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

参数:x, object
mask or Dsurface object  
面罩或Dsurface对象


参数:border
width of blank display border (metres)  
空白显示边框的宽度(米)


参数:add
logical for adding mask points to an existing plot  
逻辑面膜点到现有的图


参数:covariate
name (as character string in quotes) or column number of a covariate to use for colouring  
名称(在引号中的字符串)或列号的协变量使用的着色


参数:axes
logical for plotting axes  
逻辑绘制轴


参数:dots
logical for plotting mask points as dots, rather than as square pixels  
逻辑规划面膜点为圆点,而不是正方形像素


参数:col
colour(s) to use for plotting  
使用用于绘图的颜色(S)


参数:breaks
number of levels to use when cutting continuous covariate for plotting  
的水平切割时使用的连续协变量的图


参数:meshcol
colour for pixel borders (NA for none)  
颜色像素的边界(NA为空)


参数:ppoly
logical for whether the bounding polygon should be plotted (if "poly" specified)  
逻辑边界多边形是否应绘制(如果指定的“聚”)


参数:polycol
colour for outline of polygon (ppoly = TRUE)  
多边形轮廓的颜色(ppoly= TRUE)


参数:...
other arguments passed to eqscplot (in the case of plot.mask), plot.mask (in the case of plot.Dsurface), and points or text (in the case of spotHeight)  
其他参数传递给eqscplot(的情况下,plot.mask)plot.mask(plot.Dsurface),和points或text的情况下(spotHeight的情况下)


参数:group
group for which plot required, if more than 1  
如果超过1组所需的图,


参数:plottype
character string c("dots", "shaded", "contour", "persp")  
字符串c(“点”,“阴影”,“轮廓”,“persp”)


参数:scale
numeric multiplier for density or other numeric covariate (see Dsurface
数字乘数的密度或其他数字协(见Dsurface


参数:prefix
character vector for name(s) of covariate(s) to retrieve
名称(S)的字符向量的协变量(S)来检索


参数:dec
number of decimal places for rounding density  
数的小数位四舍五入密度


参数:point
logical for whether to plot point
逻辑是否绘制点


参数:text
logical for whether to place density label on plot
逻辑密度图上的标签是否将


参数:sep
character separator for elements if length(prefix)>1
字符分隔符的元素,如果长度(前缀)> 1


参数:session
session number or identifier
会话号或识别码


Details

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

The argument dots of plot.mask selects between two distinct types of plot (dots and shaded (coloured) pixels).
参数dotsplot.mask之间进行选择两种不同类型的图(点和阴影(彩色)像素)。

plot.Dsurface offers contour and perspective plots in addition to the options in plot.mask. It may take some experimentation to get what you want - see contour and persp.
plot.Dsurface轮廓和透视图另外的选项plot.mask。这可能需要一些试验,以得到你想要的 - 看到contour和persp。

If using a covariate or Dsurface to colour dots or pixels, the col argument should be a colour vector of length equal to the number of levels (the default palette is heat.colors, and this palette will also be used whenever there are too few levels in the palette provided; see Notes for more on palettes). Border lines around pixels are drawn in "meshcol". Set this to NA to eliminate pixel borders.
如果使用的是颜色的点或像素协或Dsurface的,col参数应该是一个颜色向量的长度相等的级别数(默认的调色板heat.colors,和调色板也可以使用每当有在调色板中提供过少的层次,更多的调色板见注)。周围像素的边界线画在“meshcol”。这NA消除像素的边框。

If a covariate is specified in a call to plot.Dsurface then that covariate will be plotted instead of density. This is a handy way to contour a covariate (contouring is not available in plot.mask).
如果一个covariate中指定在调用plot.Dsurface然后,协将被绘制,而不是密度。这是一个方便的方式来轮廓的协变量(轮廓是不具备的plot.mask)。

If "breaks" is an integer then the range of the covariate is divided into this number of equal intervals. Alternatively, "breaks" may be a vector of break points (length one more than the number of intervals). This gives more control and often "prettier"
如果断是一个整数,那么协变量的范围被分为此数目的相等的间隔。或者,“打破可以是一个向量的中断点(长度以上的间隔数)。这提供了更多的控制权,往往是“漂亮”

spotHeight may be used to interrogate a plot produced with plot.Dsurface, or by plot.mask if the mask has covariates. prefix defaults to "density." for Dsurface objects and to '' (all covariates) for mask objects. The predicted density or covariate at the nearest point is returned when the user clicks on the plot. Multiple values may be displayed (e.g., prefix = c("lcl","ucl") if Dsurface includes confidence limits). Click outside the mask or hit the Esc key to end. spotHeight deals with one session at a time.
spotHeight可以用来审问的图与plot.Dsurface或plot.mask的面具,如果有协变量。 prefix默认为“密度”。Dsurface对象“(所有协变量)的面具对象。返回预测的密度或协在最近的点,当用户点击的图。可能会显示多个值(例如,prefix = c("lcl","ucl")如果Dsurface包括置信限)。外面罩或按Esc键结束。 spotHeight处理一个会话的时间。


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

If covariate is specified and plottype = shaded then plot.mask invisibly returns a character vector of the intervals defined by "breaks" (useful for plotting a legend).
如果covariate指定plottype = shaded然后plot.mask看不见的“截断”(有用的用于绘制一个传奇)定义的时间间隔返回一个字符向量。

If "plottype = persp" then plot.mask invisibly returns a the perspective matrix that may be used to add to the plot with trans3d.
如果plottype = persp那么plot.mask无形地返回一个透视矩阵,可以用来添加的图与trans3d。

spotHeight invisibly returns a dataframe of the extracted values and their coordinates.
spotHeight无形地返回一个数据框所提取的值和它们的坐标。


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

Contouring requires a rectangular grid; if a Dsurface is not rectangular then plot.Dsurface with plottype = contour triggers a call to rectangularMask.
轮廓需要一个矩形网格;如果Dsurface不是矩形,然后plot.Dsurface,与plottype =轮廓触发调用rectangularMask。

The colour palettes topo.colors, heat.colors and terrain.colors may be viewed with the demo.pal function in the Examples code on their help page.
调色板topo.colors,heat.colors和terrain.colors可能被视为demo.pal功能在他们的帮助页中的示例代码。

The package RColorBrewer is a good source of palettes. Try display.brewer.all() and e.g., col = brewer.pal(7, 'YlGn').
包RColorBrewer是一个很好的调色板。尝试display.brewer.all()例如,col = brewer.pal(7, 'YlGn')。


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

colours, mask, Dsurface, rectangularMask, contour persp
colours,mask,Dsurface,rectangularMask,contourpersp


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



# simple[简单]

temptrap <- make.grid()
tempmask <- make.mask(temptrap)
plot (tempmask)

## restrict to points over an arbitrary detection threshold,[#限制在任意检测阈值点,]
## add covariate, plot image and overlay traps[#添加协变量,图图像覆盖陷阱]

tempmask <- subset(tempmask, pdot(tempmask,temptrap)>0.001)
covariates (tempmask) <- data.frame(circle =
    exp(-(tempmask$x^2 + tempmask$y^2)/10000) )
plot (tempmask, covariate = "circle", dots = FALSE, axes = TRUE,
    add = TRUE, breaks = 8, col = terrain.colors(8), mesh = NA)
plot (temptrap, add = TRUE)

## add a legend[#添加一个传说]
par(cex = 0.9)
covrange <- range(covariates(tempmask)$circle)
step <- diff(covrange)/8
colourlev <- terrain.colors(9)
zlev <- format(round(seq(covrange[1],covrange[2],step),2))
legend (x = "topright", fill = colourlev, legend = zlev,
    y.intersp = 0.8, title = "Covariate")

title("Colour mask points with p.(X) > 0.001")
mtext(side=3,line=-1, "g0 = 0.2, sigma = 20, nocc = 5")

## Not run: [#不运行:]

## possum density surface extrapolated across region[#负鼠推断整个区域的密度表面]

regionmask <- make.mask(traps(possumCH), buffer = 1000, spacing = 10,
    poly = possumremovalarea)
dts <- distancetotrap(regionmask, possumarea)
covariates(regionmask) <- data.frame(d.to.shore = dts)
shorePossums <- predictDsurface(possum.model.Dsh2, regionmask)

## plot as coloured pixels with white lines[#图用白色线条的彩色像素]
colourlev <- terrain.colors(7)
plot(shorePossums, breaks = seq(0,3.5,0.5), plottype = "shaded",
    poly = FALSE, col = colourlev, mesh = NA)
plot(traps(possumCH), add = TRUE, detpar = list(col = "black"))
polygon(possumremovalarea)

## check some point densities[#检查一些点密度]
spotHeight(shorePossums, dec = 1, col = "black")

## add a legend[#添加一个传说]
zlev <- format(seq(0,3,0.5), digits = 1)
legend (x = "topright", fill = colourlev, legend =
    paste(zlev,"--"), y.intersp = 1, title = "Density / ha")

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


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 12:38 , Processed in 0.025218 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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