R语言 plot()函数
语法:
plot(x, y, ...)
x,y分别是两个向量,x为横轴坐标,y为纵轴坐标
其他参数:
type=
"p" for points, 散点图 默认
"l" for lines, 线图
"b" for both, 描点连线,点与线不相连
"c" for the lines part alone of "b", 线图,点空白
"o" for both ‘overplotted’, 描点连线,线穿过点
"h" for ‘histogram’ like (or ‘high-density’) vertical lines, 从0出发的垂线
"s" for stair steps, 阶梯图
"S" for other steps, see ‘Details’ below,
"n" for no plotting. 空白图,只生成适合的横纵坐标轴
main=" " 图名
sub=" " 在图形底部加上副名
xlab = " " 横坐标轴名
ylab = " " 纵坐标轴名
xaxt = "n" 隐藏横坐标轴
yaxt = "n" 隐藏纵坐标轴
pch = 1,2,3... 对应不同的点的形状
col = " " 点或者线的颜色
若需要在一个画好的图上加点,使用函数 point()