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

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

[复制链接]
发表于 2012-9-30 10:14:33 | 显示全部楼层 |阅读模式
plotutils(smatr)
plotutils()所属R语言包:smatr

                                         Utility plotting functions
                                         实用绘图功能

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

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

Functions used in conjunction with plot.sma to customize spacing of ticks on plot axes. defineAxis creates an 'axis' object, including tick spacing, limits, and labels, that can be passed into plot.sma or nicePlot. nicePlot creates an empty plot using x and y axis objects.     
配合使用的功能plot.sma自定义图轴的刻度间距。 defineAxis创造轴的对象,包括剔间距,限制和标签,可以传递到plot.sma或nicePlot。 nicePlot使用X和Y轴对象创建一个空的图。


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


defineAxis(major.ticks, limits=NULL, minor.ticks = NULL,
        major.tick.labels = major.ticks, both.sides = FALSE)
nicePlot(xaxis, yaxis, log = "", ann = par("ann"), xlab = NULL,
        ylab = NULL,tck = par("tck"),frame.plot = TRUE, ...)



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

参数:limits
the x or y limits of the plot,  (x1, x2) or (y1,y2).
的x或y的图的限制,(X1,X2)或体(y1,y2)上。


参数:major.ticks,minor.ticks
Where to draw major and minor ticks (vectors).
在哪里画的主要和次要的的刻度线(向量)。


参数:major.tick.labels
Labels to draw at the ticks (optional).
标签画的刻度线(可选)。


参数:both.sides
a logical value indicating whether tickmarks should also be drawn on opposite sides of the plot, i.e. right or top
一个逻辑值,该值指示是否也应的相对侧上的图绘制刻度线,即右或顶部


参数:xaxis,yaxis
'axis' objects, the result of calling 'defineAxis'.
轴的对象,的结果调用defineAxis“。


参数:ann
a logical value indicating whether the default annotation (x and y axis labels) should appear on the plot.
一个逻辑值,该值指示是否默认的注释(x和y轴的标签)应该会出现在图上。


参数:xlab
a label for the x axis, defaults to a description of x.
x轴的标签,默认为x的描述。


参数:ylab
a label for the y axis, defaults to a description of y.
y轴的标签,默认的描述y的。


参数:log
One of 'x', 'y' or 'xy', specifying which axes draw in log10 scale.
其中X,Y或XY,指定的轴画log10的规模。


参数:frame.plot
a logical indicating whether a box should be drawn around the plot, by default = TRUE.  
逻辑一箱是否被周围绘制的图,默认= TRUE。


参数:tck
The length of tick marks as a fraction of the smaller of the width or height of the plotting region. If tck >= 0.5 it is interpreted as a fraction of the relevant side, so if tck = 1 grid lines are drawn. By default set to current system defaults (tck = par("tck")).
的刻度标记的长度的一小部分的小的绘图区域的宽度或高度。如果tck的> = 0.5,它被解释为有关侧的一小部分,因此,如果tck的= 1的网格线的绘制。默认情况下设置为当前系统的默认值(TCK = PAR(“TCK”))。


参数:...
Arguments to be passed to nicePlot, and therein to 'axis'.
要传递nicePlot,其中轴。


Details

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

By default, calls to plot.sma use the values given by plot.default to determine axis limits and spacing of major and minor ticks. Users can override these values by passing two 'axis' objects created by defineAxis to plot.sma. When both x and y axis objects are passed to  plot.sma, the function uses nicePlot to construct the axes according to the specified values, instead of  plot.default. As a minimum, users must at least one argument (major.ticks) to defineAxis when passing these to plot.sma.
默认情况下,调用plot.sma使用的值由plot.default的主要和次要刻度线确定的轴限制和间距。用户可以覆盖这些值通过两个轴的对象创建的defineAxis的plot.sma。当x和y轴对象传递给plot.sma,该函数使用nicePlot构造轴根据指定的值,而不是plot.default。作为最低要求,用户必须至少有一个参数(major.ticks)defineAxis通过这些plot.sma的。

The function nicePlot can also be called to construct a new set of axes according to the specified values. For this to work, axis objects must contain both major.ticks and limits.
也可以被称为构造为指定的值的所述一组新的坐标轴的功能nicePlot。对于这项工作,必须包含两个major.ticks和limits轴对象。


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

sma, plot.sma
sma,plot.sma


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


# Load leaf lifetime dataset:[加载叶一生数据集:]
data(leaflife)

#First example of axis spacing[第一个例子的轴间距]
ft <- sma(longev~lma*rain,log="xy",data=leaflife)
xax <- defineAxis(major.ticks=c(50, 100, 200, 400))
yax <- defineAxis(major.ticks=c(0.25, 0.5, 1,2,4,8))
plot(ft, xaxis=xax, yaxis=yax)

#As above, marking axes on both sides[如上所述,标记轴两侧]
xax <- defineAxis(major.ticks=c(50, 100, 200, 400), both.sides=TRUE)
yax <- defineAxis(major.ticks=c(0.25, 0.5, 1,2,4,8), both.sides=TRUE)
plot(ft, xaxis=xax, yaxis=yax)

#Using labels with log10 spacing and minor tick marks[使用标签log10的间距和次要刻度线]
xax <- defineAxis(limits=c(10, 1E3), major.ticks=seqLog(1, 1000),
        minor.ticks=makeLogMinor(seqLog(1, 1000)))
yax <- defineAxis(limits=c(1E-1, 1E1), major.ticks=seqLog(1E-2, 10),
        minor.ticks=makeLogMinor(seqLog(1E-2, 10)))
plot(ft, xaxis=xax, yaxis=yax)

#As above, but using expressions as labels[同上,但使用表达式作为标签]
xax <- defineAxis(limits=c(10, 1E3), major.ticks=seqLog(10, 1000),
        minor.ticks=makeLogMinor(seqLog(10, 1000)),
major.tick.labels = parse(text=paste("10^", c( 1,2,3), sep="")),
        both.sides=FALSE)
yax <- defineAxis(limits=c(1E-1, 1E1), major.ticks=seqLog(1E-1, 10),
        minor.ticks=makeLogMinor(seqLog(1E-1, 10)),
major.tick.labels = parse(text=paste("10^", c( -1,0,1), sep="")),
        both.sides=FALSE)
plot(ft, xaxis=xax, yaxis=yax)

#start an empty plot using nicePlot [开始使用一个空的图nicePlot]
xax <- defineAxis(limits=c(8, 1.2E3), major.ticks=seqLog(1, 1000))
yax <- defineAxis(limits=c(0.8E-1, 1.2E1), major.ticks=seqLog(1E-2, 10))
nicePlot(xax,yax,log='xy')


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-26 11:33 , Processed in 0.021536 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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