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

R语言:bxp()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-17 10:18:29 | 显示全部楼层 |阅读模式
bxp(graphics)
bxp()所属R语言包:graphics

                                        Draw Box Plots from Summaries
                                         从摘要箱线图

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

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

bxp draws box plots based on the given summaries in z. It is usually called from within boxplot, but can be invoked directly.
bxp绘制的箱线图z给定摘要。它通常被称为从内boxplot,但可以直接调用。


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


bxp(z, notch = FALSE, width = NULL, varwidth = FALSE,
    outline = TRUE, notch.frac = 0.5, log = "",
    border = par("fg"), pars = NULL, frame.plot = axes,
    horizontal = FALSE, add = FALSE, at = NULL, show.names = NULL,
    ...)



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

参数:z
a list containing data summaries to be used in constructing the plots.  These are usually the result of a call to boxplot, but can be generated in any fashion.
列表中包含的数据汇总,将用于建设图。这些通常是调用boxplot的结果,但可以以任何方式产生。


参数:notch
if notch is TRUE, a notch is drawn in each side of the boxes.  If the notches of two plots do not overlap then the medians are significantly different at the 5 percent level.
如果notch是TRUE,在每个箱子的侧面绘制了一个档次。如果两图的缺口不重叠,那么中位数在5%的水平有显着不同。


参数:width
a vector giving the relative widths of the boxes making up the plot.
向量盒使图相对宽度。


参数:varwidth
if varwidth is TRUE, the boxes are drawn with widths proportional to the square-roots of the number of observations in the groups.
varwidth如果是TRUE,绘制的框宽度比例,以观察组方基层。


参数:outline
if outline is not true, the outliers are not drawn.
outline如果是不正确的,不绘制离群。


参数:notch.frac
numeric in (0,1). When notch=TRUE, the fraction of the box width that the notches should use.
数值(0,1)。当notch=TRUE,框的宽度,缺口应该使用的一小部分。


参数:border
character or numeric (vector), the color of the box borders.  Is recycled for multiple boxes.  Is used as default for the boxcol, medcol, whiskcol, staplecol, and outcol options (see below).  
字符或数字(矢量),框边框的颜色。被回收多箱。作为默认boxcol,medcol,whiskcol,staplecol,outcol选项(见下文)。


参数:log
character, indicating if any axis should be drawn in logarithmic scale, as in plot.default.
字符,表示如有轴应在对数尺度绘制在plot.default。


参数:frame.plot
logical, indicating if a "frame" (box) should be drawn; defaults to TRUE, unless axes = FALSE is specified.
逻辑,表示如果应制定一个“框架”(box);TRUE,除非axes = FALSE指定的默认。


参数:horizontal
logical indicating if the  boxplots should be horizontal; default FALSE means vertical boxes.
逻辑指示的盒状图应该是横向的,默认的FALSE意味着垂直框。


参数:add
logical, if true add boxplot to current plot.
逻辑,如果真增加盒形图,以目前的图。


参数:at
numeric vector giving the locations where the boxplots should be drawn, particularly when add = TRUE; defaults to 1:n where n is the number of boxes.
数字向量的盒状图应绘制的位置,尤其是当add = TRUE;默认1:n其中n是箱数。


参数:show.names
Set to TRUE or FALSE to override the defaults on whether an x-axis label is printed for each group.
设置为TRUE或FALSEx轴标签是否印每组覆盖默认值。


参数:pars,...
graphical parameters (etc) can be passed as arguments to this function, either as a list (pars) or normally(...), see the following.  (Those in ... take precedence over those in pars.)  Currently, yaxs and ylim are used "along the boxplot", i.e., vertically, when horizontal is false, and xlim horizontally. xaxt, yaxt, las, cex.axis, and col.axis are passed to axis, and main, cex.main, col.main, sub, cex.sub, col.sub, xlab, ylab, cex.lab, and col.lab are passed to title.  In addition, axes is accepted (see plot.window), with default TRUE.  The following arguments (or pars components) allow further customization of the boxplot graphics.  Their defaults are typically determined from the non-prefixed version (e.g., boxlty from lty), either from the specified argument or pars component or the corresponding par one.     
(等)的图形参数可以通过这个函数的参数,无论是作为一个列表(pars)或正常(...),请参阅以下。目前,...和pars用于沿盒形图,即垂直,当<X(yaxs接管那些在ylim优先。) >是假的,horizontal水平。 xlim,xaxt,yaxt,las,cex.axis传递col.axis的,axis,main ,cex.main,col.main,sub,cex.sub,col.sub,xlab,ylab,cex.lab传递col.lab。此外,:title被接受的(看到axes),默认情况下的plot.window。以下参数(或TRUE组件)允许进一步定制的盒形图的图形。它们的默认值通常是从非前缀的版本确定(例如,parsboxlty),无论是从指定的参数或lty组件或相应的pars独。

boxwex:a scale factor to be applied to all boxes.  When there are only a few groups, the appearance of the plot can be improved by making the boxes narrower.  The default depends on at and typically is 0.8.  
boxwex:一个比例因子被应用到所有框。当有只有少数群体,图的外观可以提高箱窄。默认取决于at通常是0.8。

staplewex, outwex:staple and outlier line width expansion, proportional to box width; both default to 0.5.  
staplewex,outwex:主食和离群线宽扩大,框的宽度成正比;都默认为0.5。

boxlty, boxlwd, boxcol, boxfill:box outline type, width, color, and fill color (which currently defaults to col and will in future default to par("bg")).  
boxlty,boxlwd,boxcol,boxfill:框轮廓类型,宽度,颜色和填充颜色(目前默认为col和par("bg"))在未来的默认。

medlty, medlwd, medpch, medcex, medcol, medbg:median line type, line width, point character, point size expansion, color, and background color.  The default medpch= NA suppresses the point, and medlty="blank" does so for the line. Note thatmedlwd defaults to 3x the default lwd.  
medlty,medlwd,medpch,medcex,medcol,medbg:中线类型,线宽,字符点,点规模的扩大,颜色,背景颜色。默认medpch= NA抑制点,medlty="blank"这样做行。请注意medlwd默认3x默认lwd。

whisklty, whisklwd, whiskcol:whisker line type (default: "dashed"), width, and color.  
whisklty,“晶须线whisklwd,whiskcol类型(默认是:"dashed"),宽度和色彩。

staplelty, staplelwd, staplecol:staple (= end of whisker) line type, width, and color.  
staplelty,staplelwd,staplecol:主食(晶须年底)线的类型,宽度和颜色。

outlty, outlwd, outpch, outcex, outcol, outbgutlier line type, line width, point character, point size expansion, color, and background color.  The default outlty= "blank" suppresses the lines and outpch=NA suppresses points.     </table>
outlty,outlwd,outpch,outcex,outcol,outbg:离群型线,线的宽度,字符点,点规模的扩大,颜色,背景颜色。默认的outlty= "blank"抑制的线条和outpch=NA抑制点。 </ TABLE>


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

An invisible vector, actually identical to the at argument, with the coordinates (&quot;x&quot; if horizontal is false, &quot;y&quot; otherwise) of box centers, useful for adding to the plot.
一种无形的向量,其实是相同的at参数,盒子中心的座标(“X”,如果水平是假的,“Y”,否则),用于增加图。


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

if add = FALSE, the default is xlim = c(0.5, n +0.5). It will usually be a good idea to specify the latter if the &quot;x&quot; axis has a log scale or at is specified or width is far from uniform.
如果add = FALSE,默认的是xlim = c(0.5, n +0.5)。它通常会是一个好主意,指定后者的“X”轴日志规模或at指定或width是很不统一。


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



The R Core development team and Arni Magnusson
(then at U Washington) who has provided most changes for the
box*, med*, whisk*, staple*, and out* arguments.




参考文献----------References----------

The New S Language. Wadsworth &amp; Brooks/Cole.

举例----------Examples----------


require(stats)
set.seed(753)
(bx.p <- boxplot(split(rt(100, 4), gl(5,20))))
op <- par(mfrow= c(2,2))
bxp(bx.p, xaxt = "n")
bxp(bx.p, notch = TRUE, axes = FALSE, pch = 4, boxfill=1:5)
bxp(bx.p, notch = TRUE, boxfill= "lightblue", frame= FALSE,
    outl= FALSE, main = "bxp(*, frame= FALSE, outl= FALSE)")
bxp(bx.p, notch = TRUE, boxfill= "lightblue", border= 2:6,
    ylim = c(-4,4), pch = 22, bg = "green", log = "x",
    main = "... log='x', ylim=*")
par(op)
op <- par(mfrow= c(1,2))

## single group -- no label[#单组 - 没有标签]
boxplot (weight ~ group, data = PlantGrowth, subset = group=="ctrl")
## with label[#与标签]
bx <- boxplot(weight ~ group, data = PlantGrowth,
              subset = group=="ctrl", plot = FALSE)
bxp(bx,show.names=TRUE)
par(op)


z <- split(rnorm(1000), rpois(1000,2.2))
boxplot(z, whisklty=3, main="boxplot(z, whisklty = 3)")

## Colour support similar to plot.default:[#颜色支持相似plot.default:]
op <- par(mfrow=1:2, bg="light gray", fg="midnight blue")
boxplot(z,   col.axis="skyblue3", main="boxplot(*, col.axis=..,main=..)")
plot(z[[1]], col.axis="skyblue3", main=   "plot(*, col.axis=..,main=..)")
mtext("par(bg=\"light gray\", fg=\"midnight blue\")",
      outer = TRUE, line = -1.2)
par(op)

## Mimic S-Plus:[#模仿,S-PLUS:]
splus <- list(boxwex=0.4, staplewex=1, outwex=1, boxfill="grey40",
              medlwd=3, medcol="white", whisklty=3, outlty=1, outpch=NA)
boxplot(z, pars=splus)
## Recycled and "sweeping" parameters[#再循环和“扫”参数]
op <- par(mfrow=c(1,2))
boxplot(z, border=1:5, lty = 3, medlty = 1, medlwd = 2.5)
boxplot(z, boxfill=1:3, pch=1:5, lwd = 1.5, medcol="white")
par(op)
## too many possibilities[#太多的可能性]
boxplot(z, boxfill= "light gray", outpch = 21:25, outlty = 2,
        bg = "pink", lwd = 2,
        medcol = "dark blue", medcex = 2, medpch = 20)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-2 14:40 , Processed in 0.030421 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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