lines(graphics)
lines()所属R语言包:graphics
Add Connected Line Segments to a Plot
新增连接的线段的图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A generic function taking coordinates given in various ways and joining the corresponding points with line segments.
一个泛型函数坐标以各种方式和线段加入相应的积分。
用法----------Usage----------
lines(x, ...)
## Default S3 method:[默认方法]
lines(x, y = NULL, type = "l", ...)
参数----------Arguments----------
参数:x, y
coordinate vectors of points to join.
协调点的向量加入。
参数:type
character indicating the type of plotting; actually any of the types as in plot.default.
字符,指示策划的类型,实际上在type与plot.default的任何。
参数:...
Further graphical parameters (see par) may also be supplied as arguments, particularly, line type, lty, line width, lwd, color, col and for type = "b", pch. Also the line characteristics lend, ljoin and lmitre.
进一步的图形参数(见par)也可提供作为参数,特别是,直线型,lty,线条宽度,lwd,颜色,col和<X >,type = "b"。还行特性pch,lend和ljoin。
Details
详情----------Details----------
The coordinates can be passed in a plotting structure (a list with x and y components), a two-column matrix, a time series, .... See xy.coords. If supplied separately, they must be of the same length.
坐标可以通过在绘图结构(x和y组件的列表),一个两列的矩阵,时间序列,....看到xy.coords。如果单独提供的,它们必须是相同的长度。
The coordinates can contain NA values. If a point contains NA in either its x or y value, it is omitted from the plot, and lines are not drawn to or from such points. Thus missing values can be used to achieve breaks in lines.
坐标可以包含NA值。如果一个点包含NA在任的x或y的价值,它被省略的图,并线不绘制或从这些点。因此缺少的值可以被用来实现在线路中断。
For type = "h", col can be a vector and will be recycled as needed.
type = "h",col可以是一个向量,将回收需要。
lwd can be a vector: its first element will apply to lines but the whole vector to symbols (recycled as necessary).
lwd可以是一个向量:它的第一个元素将适用于行,但整个矢量符号(必要时回收)。
参考文献----------References----------
The New S Language. Wadsworth & Brooks/Cole.
参见----------See Also----------
lines.formula for the formula method; points, particularly for type %in% c("p","b","o"), plot, and the workhorse function plot.xy.
lines.formula公式法;points,特别是对type %in% c("p","b","o"),plot,和主力的功能plot.xy。
abline for drawing (single) straight lines.
abline绘图直线(单)。
par for how to specify colors.
par如何指定颜色。
举例----------Examples----------
# draw a smooth line through a scatter plot[通过绘制散点图平滑线]
plot(cars, main="Stopping Distance versus Speed")
lines(stats::lowess(cars))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|