grid.lines(grid)
grid.lines()所属R语言包:grid
Draw Lines in a Grid Viewport
在网格视画线
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions create and draw a series of lines.
这些功能创建并制订了一系列行。
用法----------Usage----------
grid.lines(x = unit(c(0, 1), "npc"),
y = unit(c(0, 1), "npc"),
default.units = "npc",
arrow = NULL, name = NULL,
gp=gpar(), draw = TRUE, vp = NULL)
linesGrob(x = unit(c(0, 1), "npc"),
y = unit(c(0, 1), "npc"),
default.units = "npc",
arrow = NULL, name = NULL,
gp=gpar(), vp = NULL)
grid.polyline(...)
polylineGrob(x = unit(c(0, 1), "npc"),
y = unit(c(0, 1), "npc"),
id=NULL, id.lengths=NULL,
default.units = "npc",
arrow = NULL, name = NULL,
gp=gpar(), vp = NULL)
参数----------Arguments----------
参数:x
A numeric vector or unit object specifying x-values.
一个数值向量或单位对象指定x值。
参数:y
A numeric vector or unit object specifying y-values.
一个数值向量或单位对象指定的y值。
参数:default.units
A string indicating the default units to use if x or y are only given as numeric vectors.
一个字符串,指示的默认单位使用,如果x或y只为数字向量。
参数:arrow
A list describing arrow heads to place at either end of the line, as produced by the arrow function.
列表描述箭头头放置在任该行的末尾,制作arrow功能。
参数:name
A character identifier.
字符识别。
参数:gp
An object of class gpar, typically the output from a call to the function gpar. This is basically a list of graphical parameter settings.
一个类的对象gpar,通常从调用输出函数gpar。这基本上是一个图形参数设置列表。
参数:draw
A logical value indicating whether graphics output should be produced.
一个逻辑值,指示是否应当制作图形输出。
参数:vp
A Grid viewport object (or NULL).
一个网格视口对象(或NULL)。
参数:id
A numeric vector used to separate locations in x and y into multiple lines. All locations with the same id belong to the same line.
一个数值向量,用分开x和y成多行的位置。所有位置具有相同的id属于同一行。
参数:id.lengths
A numeric vector used to separate locations in x and y into multiple lines. Specifies consecutive blocks of locations which make up separate lines.
一个数值向量,用分开x和y成多行的位置。指定的地点,使单独的行的连续块。
参数:...
Arguments passed to polylineGrob.
参数传递到polylineGrob。
Details
详情----------Details----------
The first two functions create a lines grob (a graphical object describing lines), and grid.lines draws the lines (if draw is TRUE).
前两个函数创建一个行,GROB(图形对象描述线),和grid.lines投篮线(如果draw是TRUE)。
The second two functions create or draw a polyline grob, which is just like a lines grob, except that there can be multiple distinct lines drawn.
第二个函数创建或绘制折线GROB,这就像一个线GROB,除了可以有多个不同的线条绘制。
值----------Value----------
A lines grob or a polyline grob. grid.lines returns a lines grob invisibly.
A线或折线GROB GROB。 grid.lines返回一个行GROB无形。
作者(S)----------Author(s)----------
Paul Murrell
参见----------See Also----------
Grid, viewport, arrow
电网,viewport,arrow
举例----------Examples----------
grid.lines()
# Using id (NOTE: locations are not in consecutive blocks)[使用id(注:位置不连续的块)]
grid.newpage()
grid.polyline(x=c((0:4)/10, rep(.5, 5), (10:6)/10, rep(.5, 5)),
y=c(rep(.5, 5), (10:6/10), rep(.5, 5), (0:4)/10),
id=rep(1:5, 4),
gp=gpar(col=1:5, lwd=3))
# Using id.lengths[使用id.lengths]
grid.newpage()
grid.polyline(x=outer(c(0, .5, 1, .5), 5:1/5),
y=outer(c(.5, 1, .5, 0), 5:1/5),
id.lengths=rep(4, 5),
gp=gpar(col=1:5, lwd=3))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|