기본형태
lines(x, y, lty=str, lwd=num, col=str)
1. lty=int or name
선의 스타일 (기본값 "solid")
"blank", "solid", "dashed", "dotted", "dotdash", "longdash", "twodash" 등이 있으며 아래 샘플 참조.
> plot.new()
> plot.window(xlim = c(0, 10), ylim = c(0, 10))
> axis(1)
> axis(2)
> lines(c(0,10),c(1,1),lty="solid")
> lines(c(0,10),c(2,2),lty="dashed")
> lines(c(0,10),c(3,3),lty="dotted")
> lines(c(0,10),c(4,4),lty="dotdash")
> lines(c(0,10),c(5,5),lty="longdash")
> lines(c(0,10),c(6,6),lty="twodash")
> box()
> box()
2. lwd=num
라인의 폭 결정(기본값은 1)
> plot.new()
> plot.window(xlim = c(0, 10), ylim = c(0, 10))
> axis(1)
> axis(2)
> lines(c(0,10),c(1,1),lty="solid", lwd=0.5)
> lines(c(0,10),c(2,2),lty="solid", lwd=1)
> lines(c(0,10),c(3,3),lty="solid", lwd=2)
> lines(c(0,10),c(4,4),lty="solid", lwd=3)
> box()
>
3. lend=int or name
라인의 끝 모양 결정(기본값은 "round")
4. ljoin=int or name
라인의 결합 스타일 (기본값은 "round")
> plot(c(0, 0, 4, 0, 0), c(0, 1, 1.5, 2, 3), type="l", lwd=5, ljoin="round")
> plot(c(0, 0, 4, 0, 0), c(0, 1, 1.5, 2, 3), type="l", lwd=5, ljoin="mitre")
> plot(c(0, 0, 4, 0, 0), c(0, 1, 1.5, 2, 3), type="l", lwd=5, ljoin="bevel")