箱线图之分面
1.数据整理格式如下:
qplot(pH, contents, fill=type, data=Lin1, geom=c(“boxplot”))
abc <- qplot(pH, contents, fill=type, data=Lin1, geom=c(“boxplot”))
abc + facet_grid(type ~.)
abc + facet_grid(type ~. , scales = “free_y”)
-
完整代码:
qplot(pH, contents, fill=type, data=Lin1, geom=c(“boxplot”))
abc <- qplot(pH, contents, fill=type, data=Lin1, geom=c(“boxplot”))
abc