R语言中绘制带有箱线图的散点图

标签:
r数据可视化 |
分类: R语言 |
> require(car)
> attach(women)
> #car这个包的全称是Companion to Applied
Regression
>
scatterplot(weight~height,lty.smooth=2,pch=19,col="red",main="Women
Age 30-39",xlab="Height in Inches",ylab="Weight in
Pounds")
Warning messages:
1: In plot.window(...) : "lty.smooth" is not a graphical
parameter
2: In plot.xy(xy, type, ...) : "lty.smooth" is not a graphical
parameter
3: In axis(side = side, at = at, labels = labels, ...) :
4: In axis(side = side, at = at, labels = labels, ...) :
5: In box(...) : "lty.smooth" is not a graphical
parameter
6: In title(...) : "lty.smooth" is not a graphical
parameter
> #car这个包中的scatterplot命令的主要优势在于除了有传统的散点图之外
> #还能包含平滑拟合曲线
> #最主要的是还能够加上x与y数据的箱线图
>
>
> #用到的包是car
> #用到的数据集是women(主要是身高与体重的数据)
> #用到的命令是scatterplot()
后一篇:R语言中绘制实心概率密度图