R实战系列专栏
curve 绘制函数图像
curve 函数常用于绘制函数对应的曲线,确定函数的表达式,以及对应的需要展示的起始坐标和终止坐标,curve函数就会自动化的绘制在该区间内的函数图像
curve(sin, -2*pi, 2*pi)
画箭头 arrows
> plot(1:10, 1:10)
> arrows(2,3, 4,8)
画点 points
> plot(1:10, 1:10)
> arrows(2,3, 4,8)
> points(3,2, pch = 16)
> plot(1:10, 1:10)
> arrows(2,3, 4,8)
> points(3,2, pch = 16)
> points(4,2, pch = 1)
画线
图像的叠加
> plot(1:10,41:50, xlim = c(1,10),ylim = c(1,50))
> par(new=TRUE)
> plot(1:10,21:30, xlim = c(1,10),ylim = c(1,50))
> par(new=TRUE)
> lines(1:10,11:20, xlim = c(1,10),ylim = c(1,50))
> par(new=TRUE)
> lines(1:10,31:40, xlim = c(1,10),ylim = c(1,50))