plot(graphics)
plot()所属R语言包:graphics
Generic X-Y Plotting
一般的X-Y绘图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Generic function for plotting of R objects. For more details about the graphical parameter arguments, see par.
绘制R对象的通用功能。对于有关图形参数参数的更多细节,请参阅par。
For simple scatter plots, plot.default will be used. However, there are plot methods for many R objects, including functions, data.frames, density objects, etc. Use methods(plot) and the documentation for these.
对于简单的散点图,plot.default将使用。不过,也有plot方法,许多R对象包括function的,data.frameSdensity对象等使用这些methods(plot)和文档。
用法----------Usage----------
plot(x, y, ...)
参数----------Arguments----------
参数:x
the coordinates of points in the plot. Alternatively, a single plotting structure, function or any R object with a plot method can be provided.
在剧情的坐标点。另外,可以提供一个单一的绘图结构,功能或任何一个plot方法的R对象。
参数:y
the y coordinates of points in the plot, optional if x is an appropriate structure.
y坐标点中的图,可选x如果是一个适当的结构。
参数:...
Arguments to be passed to methods, such as graphical parameters (see par). Many methods will accept the following arguments:
参数被传递到方法,如图形参数(见par)。许多方法将接受以下参数:
typewhat type of plot should be drawn. Possible types are
type应制定什么类型的图。可能的类型
"p" for points,
"p"点,
"l" for lines,
"l"线,
"b" for both,
"b",
"c" for the lines part alone of "b",
"c"独自"b"线的一部分,
"o" for both "overplotted",
"o"都“overplotted”,
"h" for "histogram" like (or "high-density") vertical lines,
"h"像“直方图”(或“高密度”)的垂直线,
"s" for stair steps,
"s"楼梯台阶,
"S" for other steps, see "Details" below,
"S"其他步骤,请参阅下面的“详细资料”,
"n" for no plotting.
"n"没有图。
All other types give a warning or an error; using, e.g., type = "punkte" being equivalent to type = "p" for S compatibility. Note that some methods, e.g. plot.factor, do not accept this.
所有其他type的,给予警告或错误使用,例如,type = "punkte"type = "p"等效的兼容性。需要注意的是一些方法,例如plot.factor不接受这个。
mainan overall title for the plot: see title.
main总冠军的图:看到title。
suba sub title for the plot: see title.
sub积分标题:title。
xlaba title for the x axis: see title.
xlabx轴标题:看到title。
ylaba title for the y axis: see title.
ylaby轴标题:看到title。
aspthe y/x aspect ratio, see plot.window.
aspy/x长宽比,看到plot.window。
Details
详情----------Details----------
The two step types differ in their x-y preference: Going from (x1,y1) to (x2,y2) with x1 < x2, type = "s" moves first horizontal, then vertical, whereas type = "S" moves the other way around.
在他们的XY偏好两步类型不同:从(x1,y1)用(x2,y2)x1 < x2,type = "s"第一的水平,然后垂直移动,而type = "S"移动其他方式。
参见----------See Also----------
plot.default, plot.formula and other methods; points, lines, par.
plot.default,plot.formula和其他方法;points,lines,par。
For X-Y-Z plotting see contour, persp and image.
的X-Y-Z的绘图contour,persp和image。
举例----------Examples----------
require(stats)
plot(cars)
lines(lowess(cars))
plot(sin, -pi, 2*pi) # see ?plot.function[看到了什么?plot.function]
## Discrete Distribution Plot:[#离散分布图:]
plot(table(rpois(100,5)), type = "h", col = "red", lwd=10,
main="rpois(100,lambda=5)")
## Simple quantiles/ECDF, see ecdf() {library(stats)} for a better one:[#简单的位数/厄立特里亚社区发展基金,看到厄立特里亚社区发展基金(){库(统计)}一个更好的:]
plot(x <- sort(rnorm(47)), type = "s", main = "plot(x, type = \"s\")")
points(x, cex = .5, col = "dark red")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|