plot( x = ToothGrowth$supp, y = ToothGrowth$len, xlab = "supp(给药方式)", ylab = "len(牙齿长度)", main = "ToothGrowth:len 随 supp 的变化", pch = 19, # 点形状:实心圆 col = "steelblue")
library(ggplot2)ggplot(ToothGrowth, aes(x = supp, y = len)) + geom_boxplot(fill="skyblue") + labs( title = "Tooth length by supplement type", x = "supp", y = "len" )
发表评论