R语言画箱线图

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"
)

评论

发表评论

了解 数据控|突破是我们的每一步 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读