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

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

[复制链接]
发表于 2012-2-16 22:14:06 | 显示全部楼层 |阅读模式
par(graphics)
par()所属R语言包:graphics

                                        Set or Query Graphical Parameters
                                         设置或查询的图形参数

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

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

par can be used to set or query graphical parameters. Parameters can be set by specifying them as arguments to par in tag = value form, or by passing them as a list of tagged values.
par可用于设置或查询的图形参数。参数指定为参数,可以设置partag = value形式,或通过他们作为一个标签值的列表。


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


par(..., no.readonly = FALSE)

<highlevel plot> (\dots, <tag> = <value>)



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

参数:...
arguments in tag = value form, or a list of tagged values.  The tags must come from the names of graphical parameters described in the "Graphical Parameters" section.
论点tag = value形式,或者一个标签值列表。标签必须来自“图形参数”一节中所描述的图形参数名。


参数:no.readonly
logical; if TRUE and there are no other arguments, only parameters are returned which can be set by a subsequent par() call on the same device.
如果TRUE“有没有其他的参数,只有参数可以设置返回逻辑;随后par()呼吁在同一设备上。


Details

详情----------Details----------

Each device has its own set of graphical parameters.  If the current device is the null device, par will open a new device before querying/setting parameters.  (What device is controlled by options("device").)
每个设备都有自己的一套图形参数。如果当前设备是空的设备,par将打开一个新的设备,查询/设置参数前。 (什么设备控制options("device")的。)

Parameters are queried by giving one or more character vectors of parameter names to par.
参数查询给一个或多个参数名称par特征向量。

par() (no arguments) or par(no.readonly=TRUE) is used to get all the graphical parameters (as a named list).  Their names are currently taken from the unexported variable graphics:::.Pars.
par()(无参数)或par(no.readonly=TRUE)用于获取所有的图形参数(如一个名为名单)。目前他们的名字取自导出,变量graphics:::.Pars。

R.O. indicates read-only arguments: These may only be used in queries and cannot be set.  ("cin", "cra", "csi", "cxy" and "din" are always read-only.)
R.O.表示只读参数:这些可能只能在查询中使用,不能设置。 ("cin","cra","csi","cxy"和"din"总是只读)。

Several parameters can only be set by a call to par():
几个参数只能设置调用par()一个:

"ask",
"ask"

"fig", "fin",
"fig","fin"

"lheight",
"lheight"

"mai", "mar", "mex", "mfcol", "mfrow", "mfg",
"mai","mar","mex","mfcol","mfrow","mfg"

"new",
"new"

"oma", "omd", "omi",
"oma","omd","omi"

"pin", "plt", "ps", "pty",
"pin","plt","ps","pty"

"usr",
"usr"

"xlog", "ylog",
"xlog","ylog"

"ylbias"
"ylbias"

The remaining parameters can also be set as arguments (often via ...) to high-level plot functions such as plot.default, plot.window, points, lines, abline, axis, title, text, mtext, segments, symbols, arrows, polygon, rect, box, contour, filled.contour and image.  Such settings will be active during the execution of the function, only.  However, see the comments on bg and cex, which may be taken as arguments to certain plot functions rather than as graphical parameters.
其余的参数也可以设置参数(通常是通过...)高层次的图功能,如plot.default,plot.window,points,lines, abline,axis,title,text,mtext,segments,symbols,arrows,polygon,rect,box,contour,filled.contour和image。这样的设置,将函数的执行过程中,只有积极。然而,看到bg和cex,可能采取的某些图,而不是作为图形参数功能参数的意见。

The meaning of "character size" is not well-defined: this is set up for the device taking pointsize into account but often not the actual font family in use.  Internally the corresponding pars (cra, cin, cxy and csi) are used only to set the inter-line spacing used to convert mar and oma to physical margins.  (The same inter-line spacing multiplied by lheight is used for multi-line strings in text and strheight.)
“字符大小”的含义是不明确的:这是设备的设置以考虑pointsize但往往没有实际使用中的字体家族。国内相应的标准杆(cra,cin,cxy和csi)仅用于设置行间的间距,用于转换mar和oma物理利润率。 (lheight乘以相同的跨线间距为多行字符串text和strheight。)


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

When parameters are set, their previous values are returned in an invisible named list.  Such a list can be passed as an argument to par to restore the parameter values.  Use par(no.readonly   = TRUE) for the full list of parameters that can be restored. However, restoring all of these is not wise: see the "Note" section.
设置参数时,返回其先前的值在一种无形的命名名单。作为par恢复参数值的参数,可以通过这样一个列表。使用par(no.readonly   = TRUE)可以恢复的参数的完整列表。然而,恢复所有这些是不是明智的做法:见“注”部分。

When just one parameter is queried, the value of that parameter is returned as (atomic) vector.  When two or more parameters are queried, their values are returned in a list, with the list names giving the parameters.
当查询只有一个参数,该参数值,则返回(原子)向量。当两个或多个参数的查询,列表中返回它们的值给参数列表名称。

Note the inconsistency: setting one parameter returns a list, but querying one parameter returns a vector.
注意不一致:设置一个参数,返回一个列表,但查询一个参数返回一个向量。


图形参数----------Graphical Parameters----------

参数:adj
The value of adj determines the way in which text strings are justified in text, mtext and title.  A value of 0 produces left-justified text, 0.5 (the default) centered text and 1 right-justified text.  (Any value in [0, 1] is allowed, and on most devices values outside that interval will also work.)  Note that the adj argument of text also allows adj = c(x, y) for different adjustment in x- and y- directions.  Note that whereas for text it refers to positioning of text about a point, for mtext and title it controls placement within the plot or device region.
值adj决定在其中的文本字符串text,mtext和title合理的方式。一个0价值产生左对齐的文本,0.5(默认)为中心的文本和1右对齐文本。 (任何[0, 1]是允许的,和大多数设备值超出该区间的价值也将正常工作。)请注意,参数adjtext也可以adj = c(x, y)不同的调整在x和y方向。请注意,而对于text它指的是定位的一个点左右的文本,mtext和title它控制的图或设备区域内安置。

参数:ann
If set to FALSE, high-level plotting functions calling plot.default do not annotate the plots they produce with axis titles and overall titles.  The default is to do annotation.
如果设置为FALSE,高层次的绘图函数调用plot.default不标注的图,他们与轴标题和整体冠军产生。默认是做注解。

参数:ask
logical.  If TRUE (and the R session is interactive) the user is asked for input, before a new figure is drawn.  As this applies to the device, it also affects output by packages grid and lattice.  It can be set even on non-screen devices but may have no effect there.  This not really a graphics parameter, and its use is deprecated in favour of devAskNewPage.  
逻辑。如果TRUE(R会话是互动的),用户被要求输入一个新的图绘制之前。因为这适用于设备,它也影响包grid和lattice输出。它可以设置,即使在非屏幕设备,但有可能没有任何效果。这不是真正的图形参数,它的使用已过时赞成devAskNewPage。

参数:bg
The color to be used for the background of the device region.  When called from par() it also sets new=FALSE. See section "Color Specification" for suitable values.  For many devices the initial value is set from the bg argument of the device, and for the rest it is normally "white".  Note that some graphics functions such as plot.default and points have an argument of this name with a different meaning.
用于设备区域的背景颜色。当从par()称为还设置new=FALSE。见部分为合适的值,颜色规格。对于许多设备的初始值设置bg设备的参数,其余通常是"white"。需要注意的是一些图形功能,如plot.default和points这个名字的参数有不同的含义

参数:bty
A character string which determined the type of box which is drawn about plots.  If bty is one of "o" (the default), "l", "7", "c", "u", or "]" the resulting box resembles the corresponding upper case letter.  A value of "n" suppresses the box.
box这是图绘制的类型确定一个字符串。 bty如果是一个"o"(默认),"l","7","c","u"或"]"结果框中类似于相应的大写字母。值的"n"抑制框。

参数:cex
A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default.  This starts as 1 when a device is opened, and is reset when the layout is changed, e.g. by setting mfrow.  Note that some graphics functions such as plot.default have an argument of this name which multiplies this graphical parameter, and some functions such as points accept a vector of values which are recycled.  Other uses will take just the first value if a vector of length greater than one is supplied.  
一个数值给图文字和符号相对应放大默认的金额。这将启动1当一个设备被打开,并重置布局改变时,如设置mfrow。请注意,如一些图形功能plot.default乘以这个图形的参数名称参数,如一些职能points接受回收价值的向量。如果长度大于一的向量提供其他用途,只是采取的第一个值。

参数:cex.axis
The magnification to be used for axis annotation relative to the current setting of cex.
放大倍率可用于轴标注相对cex当前设置。

参数:cex.lab
The magnification to be used for x and y labels relative to the current setting of cex.
x和y的相对cex当前设置的标签可用于放大倍率。

参数:cex.main
The magnification to be used for main titles relative to the current setting of cex.
用于放大倍率相对cex当前设置的主标题。

参数:cex.sub
The magnification to be used for sub-titles relative to the current setting of cex.
子标题相对cex当前设置要使用的放大倍率。

参数:cin
R.O.; character size (width, height) in inches.  These are the same measurements as cra, expressed in different units.
R.O.;字符大小(width, height)英寸。这些cra,在不同的单位表示相同的测量。

参数:col
A specification for the default plotting color.  See section "Color Specification". (Some functions such as lines accept a vector of values which are recycled.  Other uses will take just the first value if a vector of length greater than one is supplied.)  
一个规范的默认绘图颜色。见节的颜色规格。 (如某些功能lines接受回收价值的向量。其他用途,只是采取的第一个值,如果提供一个长度大于一向量)。

参数:col.axis
The color to be used for axis annotation.  Defaults to "black".
用于轴标注的颜色。 "black"默认。

参数:col.lab
The color to be used for x and y labels. Defaults to "black".  
用于x和y标签的颜色。 "black"默认。

参数:col.main
The color to be used for plot main titles. Defaults to "black".  
用于小区主标题的颜色。 "black"默认。

参数:col.sub
The color to be used for plot sub-titles. Defaults to "black".  
用于积子标题的颜色。 "black"默认。

参数:cra
R.O.; size of default character (width, height) in "rasters" (pixels).  Some devices have no concept of pixels and so assume an arbitrary pixel size, usually 1/72 inch.  These are the same measurements as cin, expressed in different units.
反渗透;大小默认字符(width, height)“栅格”(像素)。有些设备有没有像素的概念,所以假设任意一个像素的大小,通常为1/72英寸。这些cin,在不同的单位表示相同的测量。

参数:crt
A numerical value specifying (in degrees) how single characters should be rotated.  It is unwise to expect values other than multiples of 90 to work.  Compare with srt which does string rotation.
一个数值(度)指定单个字符应该如何旋转。这是不明智的期待值大于90的倍数的其他工作。 srt不串旋转比较。

参数:csi
R.O.; height of (default-sized) characters in inches.  The same as par("cin")[2].
反渗透;(默认大小)英寸字符高度。 par("cin")[2]。

参数:cxy
R.O.; size of default character (width, height) in user coordinate units. par("cxy") is par("cin")/par("pin") scaled to user coordinates. Note that c(strwidth(ch), strheight(ch)) for a given string ch is usually much more precise.
反渗透;默认字符大小(width, height)用户协调单位。 par("cxy")是par("cin")/par("pin")缩放用户坐标。注意c(strwidth(ch), strheight(ch))对于一个给定的字符串ch通常是更精确。

参数:din
R.O.; the device dimensions, (width,height), in inches.  See also dev.size, which is updated immediately when an on-screen device windows is re-sized.
R.O.;设备尺寸,(width,height),以英寸为单位。也见dev.size,这是立即更新时,屏幕上的设备窗口重新中型。

参数:err
(Unimplemented; R is silent when points outside the plot region are not plotted.) The degree of error reporting desired.
(未实现; R是沉默的时候积区域外的点绘制。)的错误报告所需的程度。

参数:family
The name of a font family for drawing text. The maximum allowed length is 200 bytes. This name gets mapped by each graphics device to a device-specific font description.  The default value is "" which means that the default device fonts will be used (and what those are should be listed on the help page for the device).  Standard values are "serif", "sans" and "mono", and the Hershey font families are also available.  (Different devices may define others, and some devices will ignore this setting completely.)  This can be specified inline for text.
绘制文本的字体系列名称。允许的最大长度是200字节。这名被映射到每个图形设备设备特定的字体描述。默认值是""这意味着默认设备字体将用于(那些应该帮助页面上列出的设备)。标准值是"serif","sans"和"mono",赫尔希字体家庭也可用。 (不同的设备可以定义别人,和一些设备将完全忽略此设置)。这可以被指定为text联。

参数:fg
The color to be used for the foreground of plots. This is the default color used for things like axes and boxes around plots.  When called from par() this also sets parameter col to the same value.  See section "Color Specification".  A few devices have an argument to set the initial value, which is otherwise "black".
用于图的前景颜色。这是默认的颜色,用于轴及周边图盒一样的东西。当从par()称为这还设置参数col相同的值。见节的颜色规格。一些设备,有一个参数来设置初始值,否则这是"black"。

参数:fig
A numerical vector of the form c(x1, x2, y1, y2) which gives the (NDC) coordinates of the figure region in the display region of the device. If you set this, unlike S, you start a new plot, so to add to an existing plot use new=TRUE as well.
一个数值向量的形式c(x1, x2, y1, y2)这给图区域(国发)在设备的显示区域协调。如果你设置这个,不像小号,你开始一个新的图,所以添加到现有的图使用new=TRUE以及。

参数:fin
The figure region dimensions, (width,height), in inches. If you set this, unlike S, you start a new plot.
图区域的尺寸,(width,height)英寸。如果设置此不同,S,你开始一个新的图。

参数:font
An integer which specifies which font to use for text.  If possible, device drivers arrange so that 1 corresponds to plain text (the default), 2 to bold face, 3 to italic and 4 to bold italic.  Also, font 5 is expected to be the symbol font, in Adobe symbol encoding.  On some devices font families can be selected by family to choose different sets of 5 fonts.
一个整数,指定使用文本的字体。如果可能的话,设备驱动程序安排,使1对应于纯文本(默认值),2粗体,3至斜体和粗斜体。此外,字体5预计将在Adobe符号编码,符号字体。在某些设备上的字体的家庭可以选择由family5字体选择不同套。

参数:font.axis
The font to be used for axis annotation.
用于轴标注的字体。

参数:font.lab
The font to be used for x and y labels.
用于x和y标签的字体。

参数:font.main
The font to be used for plot main titles.
要用于小区主标题字体。

参数:font.sub
The font to be used for plot sub-titles.
用于积子标题字体。

参数:lab
A numerical vector of the form c(x, y, len) which modifies the default way that axes are annotated.  The values of x and y give the (approximate) number of tickmarks on the x and y axes and len specifies the label length.  The default is c(5, 5, 7).  Note that this only affects the way the parameters xaxp and yaxp are set when the user coordinate system is set up, and is not consulted when axes are drawn. len is unimplemented in R.
一个数值向量的形式c(x, y, len)修改轴注释的默认方式。的值x和ytickmarks X和Y轴和(近似)len指定标签的长度。默认c(5, 5, 7)。请注意,这不仅影响方式的参数xaxp和yaxp时设置的用户坐标系统设置,并没有征询轴绘制时。 lenR中的未实现

参数:las
numeric in {0,1,2,3}; the style of axis labels.     
{0,1,2,3}轴标签的风格;数字。

0: always parallel to the axis [default],  
0:总是平行轴[默认]

1:always horizontal,  
1:总是水平,

2:always perpendicular to the axis,  
2:总是垂直于轴线,

3:always vertical.   
3:始终垂直。

参数:lend
The line end style.  This can be specified as an integer or string:     
行的结尾的风格。这可以被指定为整数或字符串:

0 and "round" mean rounded line caps [default];  
0和"round"平均四舍五入线帽[默认];

1and "butt" mean butt line caps;  
1和"butt"意味着对接线帽;

2and "square" mean square line caps.   
2和"square"均方根线帽。

参数:lheight
The line height multiplier. The height of a line of text (used to vertically space multi-line text) is found by multiplying the character height both by the current character expansion and by the line height multiplier.  Default value is 1.  Used in text and strheight.
行的高度乘数。当前字符的扩展和行的高度乘数乘以字符高度的文本行的高度(用于垂直空间多行文本)。默认值是1。用于text和strheight。

参数:ljoin
The line join style. This can be specified as an integer or string:     
加入该行的风格。这可以被指定为整数或字符串:

0 and "round" mean rounded line joins [default];  
0和"round"圆线联接[默认];

1and "mitre" mean mitred line joins;  
1和"mitre"的意思是斜接线连接;

2and "bevel" mean bevelled line joins.   
2和"bevel"的意思是斜切线连接。

参数:lmitre
The line mitre limit.  This controls when mitred line joins are automatically converted into bevelled line joins.  The value must be larger than 1 and the default is 10. Not all devices will honour this setting.
线斜切限制。这控制斜接线路时,连接被自动转换成斜面线连接。该值必须大于1,默认为10。并非所有设备都将遵守此设置。

参数:lty
The line type. Line types can either be specified as an integer (0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash) or as one of the character strings "blank", "solid", "dashed", "dotted", "dotdash", "longdash", or "twodash", where "blank" uses "invisible lines" (i.e., does not draw them).  Alternatively, a string of up to 8 characters (from c(1:9, "A":"F")) may be given, giving the length of line segments which are alternatively drawn and skipped.  See section "Line Type Specification".  Some functions such as lines accept a vector of values which are recycled.  Other uses will take just the first value if a vector of length greater than one is supplied.  
线路类型。线路类型可以被指定为一个整数(0 =空白,1 =固体(默认),2 =虚线,3 =虚线,4 = dotdash,5 = longdash,6 = twodash)或字符串"blank","solid","dashed","dotted","dotdash","longdash"或"twodash",其中"blank"用途“看不见的线“(即不画)。另外,可能会高达8个字符(c(1:9, "A":"F")),交替绘制和跳过线段的长度。请参阅节“线路类型规格”。如一些职能lines接受回收价值的向量。如果长度大于一的向量提供其他用途,只是采取的第一个值。

参数:lwd
The line width, a positive number, defaulting to 1.  The interpretation is device-specific, and some devices do not implement line widths less than one. (See the help on the device for details of the interpretation.)  Some functions such as lines accept a vector of values which are recycled.  Other uses will take just the first value if a vector of length greater than one is supplied.  
线条的宽度,一个正数,违约1。设备特定的解释是,某些设备不执行线宽小于一。 (见解释的详细信息,设备上的帮助。),如lines接受回收价值的向量的一些功能。如果长度大于一的向量提供其他用途,只是采取的第一个值。

参数:mai
A numerical vector of the form c(bottom, left, top, right) which gives the margin size specified in inches.<br> <img src="figures/mai.png" width=35% alt="Figure: mai.png" />   
数控的形式c(bottom, left, top, right)给英寸指定的保证金规模。参考<img src=&quot;figures/mai.png&quot; width=35% alt=&quot;Figure:的向量mai.png&quot; />

参数:mar
A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot. The default is c(5, 4, 4, 2) + 0.1.
一个数值向量的形式c(bottom, left, top, right)这使保证金数量上的图,四面被指定行。默认c(5, 4, 4, 2) + 0.1。

参数:mex
mex is a character size expansion factor which is used to describe coordinates in the margins of plots. Note that this does not change the font size, rather specifies the size of font (as a multiple of csi) used to convert between mar and mai, and between oma and omi.  This starts as 1 when the device is opened, and is reset when the layout is changed (alongside resetting cex).  
mex是一个字符大小的膨胀系数是用来描述在图边缘的坐标。请注意,这并不改变字体大小,而指定的字体大小(多了csi)之间进行转换mar和mai,oma的 omi。启动1当设备被打开,并复位布局改变时(旁边重置cex)。

参数:mfcol, mfrow
A vector of the form c(nr, nc). Subsequent figures will be drawn in an nr-by-nc array on the device by columns (mfcol), or rows (mfrow), respectively.  In a layout with exactly two rows and columns the base value of "cex" is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is 0.66.  Setting a layout resets the base value of cex and that of mex to 1.  If either of these is queried it will give the current layout, so querying cannot tell you the order in which the array will be filled.  Consider the alternatives, layout and split.screen.  
一个向量形式c(nr, nc)。随后的数据将绘制nrnc(mfcol),或行(mfrow),分别列的设备阵列。在整整两个行和列的基值的布局"cex"减少了0.83倍,如果有三个或三个或行或列,折减系数为0.66。设置布局重置基值cex和mex1。如果这些质疑,它会给当前的布局,以便查询,不能告诉你,阵列将充满顺序。考虑替代方案,layout和split.screen。

参数:mfg
A numerical vector of the form c(i, j) where i and j indicate which figure in an array of figures is to be drawn next (if setting) or is being drawn (if enquiring).  The array must already have been set by mfcol or mfrow.  For compatibility with S, the form c(i, j, nr, nc) is also accepted, when nr and nc should be the current number of rows and number of columns.  Mismatches will be ignored, with a warning.
一个数值向量的形式c(i, j)其中i和j表示图中的数字数组是要绘制未来(如果设置)或正在制定(如查询)。该数组必须已经被设置mfcol或mfrow。与S的兼容性,形式c(i, j, nr, nc)也接受了,当nr和nc应该是当前的行数和列数。不匹配将被忽略,一个警告。

参数:mgp
The margin line (in mex units) for the axis title, axis labels and axis line.  Note that mgp[1] affects title whereas mgp[2:3] affect axis. The default is c(3, 1, 0).
限界线(mex单位)轴标题,轴标签和轴线。请注意,mgp[1]影响title而mgp[2:3]影响axis的。默认c(3, 1, 0)。

参数:mkh
The height in inches of symbols to be drawn when the value of pch is an integer. Completely ignored in R.  
要绘制的符号英寸的高度当值pch是一个整数。完全忽略了在R

参数:new
logical, defaulting to FALSE.  If set to TRUE, the next high-level plotting command (actually plot.new) should not clean the frame before drawing as if it were on a new device.  It is an error (ignored with a warning) to try to use new = TRUE on a device that does not currently contain a high-level plot.
逻辑,拖欠FALSE。如果设置为TRUE,下一个高层次的绘图命令(实际上是plot.new)应不干净的画,就好像它是一个新的设备上之前的帧。这是一个错误(忽略警告)尝试使用new = TRUE设备上,目前不包含一个高层次的图。

参数:oma
A vector of the form c(bottom, left, top, right) giving the size of the outer margins in lines of text.<br> <img src="figures/oma.png" width=25% alt="Figure: oma.png" />   
一个向量的形式c(bottom, left, top, right)行文字外边缘的大小参考<IMG SRC =“数字/ oma.png的”宽度= 25%ALT =。图:oma.png“/ >

参数:omd
A vector of the form c(x1, x2, y1, y2) giving the region inside outer margins in NDC (= normalized device coordinates), i.e., as a fraction (in [0, 1]) of the device region.
形式为向量c(x1, x2, y1, y2)的设备区域的一小部分([0, 1]),给该区域内外部NDC的(=规格化设备坐标),即利润率。

参数:omi
A vector of the form c(bottom, left, top, right) giving the size of the outer margins in inches.
一个向量的形式c(bottom, left, top, right)英寸的外边缘的大小。

参数:pch
Either an integer specifying a symbol or a single character to be used as the default in plotting points.  See points for possible values and their interpretation. Note that only integers and single-character strings can be set as a graphics parameter (and not NA nor NULL).  
一个整数,指定一个符号或单个字符被用来作为策划点的默认。看到points可能的值和他们的解释。请注意,只有整数和单字符的字符串可以被设置为一个图形参数(不NA也NULL)。

参数:pin
The current plot dimensions, (width,height), in inches.
目前积尺寸,(width,height)英寸。

参数:plt
A vector of the form c(x1, x2, y1, y2) giving the coordinates of the plot region as fractions of the current figure region.
一个向量形式c(x1, x2, y1, y2)图区域的坐标为目前的数字区的分数给予。

参数:ps
integer; the point size of text (but not symbols).  Unlike the pointsize argument of most devices, this does not change the relationship between mar and mai (nor oma and omi).  What is meant by "point size" is device-specific, but most devices mean a multiple of 1bp, that is 1/72 of an inch.  
整数;文本的点大小(但不包括符号)。 pointsize大多数设备的参数不同,这不会改变mar和mai(也不oma和omi)之间的关系。什么是“点大小”的含义是特定设备,但大多数设备意味着多了1BP,这是1/72英寸。

参数:pty
A character specifying the type of plot region to be used; "s" generates a square plotting region and "m" generates the maximal plotting region.
一个字符指定类型图区域使用; "s"生成一个方形的绘图区域和"m"产生最大的绘图区域。

参数:smo
(Unimplemented) a value which indicates how smooth circles and circular arcs should be.
(未实现),这表明如何应该是光滑的圆和圆弧的价值。

参数:srt
The string rotation in degrees.  See the comment about crt.  Only supported by text.   
字符串度旋转。看到crt的评论。只支持text。

参数: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.  The default setting (tck = NA) is to use tcl = -0.5.
刻度线的长度标志着绘图区域的高度或宽度小的一小部分。如果tck >= 0.5它被解释为相关方的一小部分,所以如果tck = 1网格线绘制。默认设置(tck = NA)是使用tcl = -0.5。

参数:tcl
The length of tick marks as a fraction of the height of a line of text.  The default value is -0.5; setting tcl = NA sets tck = -0.01 which is S' default.
刻度线的长度标志着作为一小部分的文本行的高度。默认值是-0.5设置tcl = NAtck = -0.01s的预设设置。

参数:usr
A vector of the form c(x1, x2, y1, y2) giving the extremes of the user coordinates of the plotting region.  When a logarithmic scale is in use (i.e., par("xlog") is true, see below), then the x-limits will be 10 ^ par("usr")[1:2].  Similarly for the y-axis.  
形式为向量c(x1, x2, y1, y2)给用户坐标绘图区域的极端。当使用(即par("xlog")是真实的,见下文)是对数刻度,然后将X-限额10 ^ par("usr")[1:2]。同样为y轴。

参数:xaxp
A vector of the form c(x1, x2, n) giving the coordinates of the extreme tick marks and the number of intervals between tick-marks when par("xlog") is false. Otherwise, when log coordinates are active, the three values have a different meaning: For a small range, n is negative, and the ticks are as in the linear case, otherwise, n is in 1:3, specifying a case number, and x1 and x2 are the lowest and highest power of 10 inside the user coordinates, 10 ^ par("usr")[1:2]. (The "usr" coordinates are log10-transformed here!)     
形式为向量c(x1, x2, n)给人极端刻度的坐标和打勾标记之间的间隔时par("xlog")是假的。否则,日志坐标活跃时,这三个值有不同的含义:对于一个小的范围内,n是负面的,刻度线线性情况,否则,n< x>,并指定情况的数量,和1:3和x110是最高和最低的电源内的用户坐标,x2。 (10 ^ par("usr")[1:2]坐标,LOG10转化!)

n=1 will produce tick marks at 10^j for integer j,  
n = 1时会产生10^j整数j刻度,

n=2gives marks  k 10^j with k in {1,5},  
N = 2gives标志着k 10^jk in {1,5},

n=3gives marks  k 10^j with k in {1,2,5}.   
N = 3gives标志着k 10^j与k in {1,2,5}。

参数:xaxs
The style of axis interval calculation to be used for the x-axis.  Possible values are "r", "i", "e", "s", "d".  The styles are generally controlled by the range of data or xlim, if given.<br> Style "r" (regular) first extends the data range by 4 percent at each end and then finds an axis with pretty labels that fits within the extended range.<br> Style "i" (internal) just finds an axis with pretty labels that fits within the original data range.<br> Style "s" (standard) finds an axis with pretty labels within which the original data range fits.<br> Style "e" (extended) is like style "s", except that it is also ensures that there is room for plotting symbols within the bounding box.<br> Style "d" (direct) specifies that the current axis should be used on subsequent plots.<br> (Only "r" and "i" styles have been implemented in R.)
用于x轴的轴间隔计算的风格。可能的值是"r","i","e","s","d"。一般控制范围内的数据或xlim,如果给定的参考样式"r"(常会)首次延长4%的数据的范围,在每年年底,然后找到一个轴与漂亮的样式标签适合扩展的范围内。参考样式"i"(内部)只是漂亮的标签,适合原始数据的范围内找到一个轴。参考样式"s"(标准)发现一个轴参考样式与原始数据的范围内适合的漂亮的标签。"e"(扩展)般的风格是"s",除了它是确保有房间在边界框绘制符号。参考样式"d"(直接)指定当前轴应在随后的图。参考(只有"r"和"i"样式已在河实施)

参数:xaxt
A character which specifies the x axis type. Specifying "n" suppresses plotting of the axis.  The standard value is "s": for compatibility with S values "l" and "t" are accepted but are equivalent to "s": any value other than "n" implies plotting.
一个字符指定x轴的类型。指定"n"抑制绘制轴。标准值是"s":S值的相容性"l"和"t"被接受,但相当于"s"比"n"意味着策划的其他任何值。

参数:xlog
A logical value (see log in plot.default).  If TRUE, a logarithmic scale is in use (e.g., after plot(*, log = "x")). For a new device, it defaults to FALSE, i.e., linear scale.
一个逻辑值(见logplot.default)。如果TRUE,对数刻度是在使用中(例如,后plot(*, log = "x"))。对于一个新的设备,它默认为FALSE,即,线性度。

参数:xpd
A logical value or NA. If FALSE, all plotting is clipped to the plot region, if TRUE, all plotting is clipped to the figure region, and if NA, all plotting is clipped to the device region.  See also clip.
一个逻辑值或NA。如果FALSE,所有的图被截断的图区域,如果TRUE,所有绘制裁剪图区域,如果NA,所有的图被裁剪设备区域。还可以看clip。

参数:yaxp
A vector of the form c(y1, y2, n) giving the coordinates of the extreme tick marks and the number of intervals between tick-marks unless for log coordinates, see xaxp above.
形式向量c(y1, y2, n)极端的刻度和打勾标记之间的间隔数坐标除非日志座标,看到xaxp以上。

参数:yaxs
The style of axis interval calculation to be used for the y-axis.  See xaxs above.
用于y轴的轴间隔计算的风格。看到xaxs以上。

参数:yaxt
A character which specifies the y axis type. Specifying "n" suppresses plotting.
一个字符指定y轴的类型。指定"n"抑制图。

参数:ylbias
A positive real value used in the positioning of text in the margins by axis and mtext.  The default is in principle device-specific, but currently 0.2 for all of R's own devices.  Set this to 0.2 for compatibility with R < 2.14.0 on x11 and windows() devices.
一个积极的实际价值的利润用于在文字的定位axis和mtext。默认的是在特定设备的原则,但目前0.2R的所有自己的设备。为与R的兼容性<2.14.00.2x11和windows()设备。

参数:ylog
A logical value; see xlog above.
一个逻辑值,看到xlog以上。


颜色规格----------Color Specification----------

Colors can be specified in several different ways. The simplest way is with a character string giving the color name (e.g., "red").  A list of the possible colors can be obtained with the function colors.  Alternatively, colors can be specified directly in terms of their RGB components with a string of the form "#RRGGBB" where each of the pairs RR, GG, BB consist of two hexadecimal digits giving a value in the range 00 to FF. Colors can also be specified by giving an index into a small table of colors, the palette.  This provides compatibility with S.  Index 0 corresponds to the background color.  (Because apparently some people have been assuming it, it is also possible to specify integers as character strings, e.g. "3".)
颜色可以指定几种不同的方式。最简单的方法是用字符颜色名称的字符串(例如,"red")。一个可能的颜色列表,可以得到与功能colors。此外,颜色可以指定他们的RGB分量直接与形式"#RRGGBB"的地方,对每个RR,GG,BB包括两个十六进制的字符串数字值范围内的00FF的。颜色也可以指定给索引颜色的小桌子,palette。这提供了兼容性与指数0对应的背景色。 (因为有些人显然已经假设它,它也可以指定为字符串的整数,例如"3"。)

Additionally, "transparent" or (integer) NA is transparent, useful for filled areas (such as the background!), and just invisible for things like lines or text.  Semi-transparent colors are available for use on devices that support them.
此外,"transparent"(整数)NA是透明的,有用的填充区域(如背景),线条或文字一样的东西,只是看不见。半透明的颜色,是支持他们的设备上使用。

The functions rgb, hsv, hcl, gray and rainbow provide additional ways of generating colors.
职能rgb,hsv,hcl,gray和rainbow提供的其他方式产生的颜色。


线路类型规格----------Line Type Specification----------

Line types can either be specified by giving an index into a small built-in table of line types (1 = solid, 2 = dashed, etc, see lty above) or directly as the lengths of on/off stretches of line.  This is done with a string of an even number (up to eight) of characters, namely non-zero (hexadecimal) digits which give the lengths in consecutive positions in the string.  For example, the string "33" specifies three units on followed by three off and "3313" specifies three units on followed by three off followed by one on and finally three off. The "units" here are (on most devices) proportional to lwd, and with lwd = 1 are in pixels or points or 1/96 inch.
线路类型可以被指定给内置小线类型(1 =固体,2 =虚线等,看到lty以上)的表或索引,直接/关闭延伸长度线。这是一个字符串的字符,即非零数字(十六进制),这给在连续位置的字符串的长度为偶数(八)。例如,字符串"33"三个单位指定三关"3313"指定三个单位一个和最后三关三关。这里的“单位”(大多数设备)成正比lwd用lwd = 1像素或点,或1/96英寸。

The five standard dash-dot line types (lty = 2:6) correspond to c("44", "13", "1343", "73", "2262").
标准五点划线线类型对应lty = 2:6(c("44", "13", "1343", "73", "2262"))。

Note that NA is not a valid value for lty.
请注意,NA是不是一个有效的值lty。


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

The effect of restoring all the (settable) graphics parameters as in the examples is hard to predict if the device has been resized. Several of them are attempting to set the same things in different ways, and those last in the alphabet will win.  In particular, the settings of mai, mar, pin, plt and pty interact, as do the outer margin settings, the figure layout and figure region size.
恢复的例子,如(设置)图形参数的影响很难预测,如果该设备已被调整大小。其中有几个正试图以不同的方式设置同样的事情,和那些在字母表中的最后将赢得。特别是,mai,mar,pin,plt和pty互动,因为这样做的外缘设置,布局和数字图区域设置大小。


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

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


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

plot.default for some high-level plotting parameters; colors; clip; options for other setup parameters; graphic devices x11, postscript and setting up device regions by layout and split.screen.
plot.default一些高层次的策划参数; colors;clip;options其他设置参数;图形设备x11,postscript“设置高达器件layout和split.screen区域。


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


op &lt;- par(mfrow = c(2, 2), # 2 x 2 pictures on one plot[2×2张图片,一个绘图]
          pty = "s")       # square plotting region,[方图区域,]
                           # independent of device size[独立于设备的大小]

## At end of plotting, reset to previous settings:[#图年底,恢复到以前的设置:]
par(op)

## Alternatively,[#另外,]
op &lt;- par(no.readonly = TRUE) # the whole list of settable par's.[设置面值的整个列表。]
## do lots of plotting and par(.) calls, then reset:[#做的大量策划和面值的呼叫,然后重置():]
par(op)
## Note this is not in general good practice[#注意:这不是一般的好做法]

par("ylog") # FALSE[假]
plot(1 : 12, log = "y")
par("ylog") # TRUE[真]

plot(1:2, xaxs = "i") # 'inner axis' w/o extra space[“内轴”W / O额外的空间]
par(c("usr", "xaxp"))

( nr.prof <-
  c(prof.pilots=16,lawyers=11,farmers=10,salesmen=9,physicians=9,
    mechanics=6,policemen=6,managers=6,engineers=5,teachers=4,
    housewives=3,students=3,armed.forces=1))
par(las = 3)
barplot(rbind(nr.prof)) # R 0.63.2: shows alignment problem[0.63.2&#341;:显示对齐问题]
par(las = 0)# reset to default[重置为默认]

require(grDevices) # for gray[灰]
## 'fg' use:[#FG使用:]
plot(1:12, type = "b", main="'fg' : axes, ticks and box in gray",
     fg = gray(0.7), bty="7" , sub=R.version.string)

ex <- function() {
   old.par &lt;- par(no.readonly = TRUE) # all par settings which[所有面值的设置]
                                      # could be changed.[可以改变的。]
   on.exit(par(old.par))
   ## ...[#...]
   ## ... do lots of par() settings and plots[#...做大量面值()的设置和图]
   ## ...[#...]
   invisible() #-- now,  par(old.par)  will be executed[ - 现在,杆(old.par)将被执行]
}
ex()

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-22 19:55 , Processed in 0.022696 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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