library(MASS)
ggplot(birthwt, aes(x=factor(race), y=bwt)) + geom_boxplot()
birthwt
low age lwt race smoke ptl ht ui ftv bwt
0 19 182 2 0 0 0 1 0 2523
0 33 155 3 0 0 0 0 3 2551
0 20 105 1 1 0 0 0 1 2557
========================================
ggplot(birthwt, aes(x=factor(race), y=bwt))+geom_boxplot(width=.5)
ggplot(birthwt, aes(x=factor(race), y=bwt)) +geom_boxplot(outlier.size=1.5, outlier.shape=21)
ggplot(birthwt, aes(x=factor(race), y=bwt,colour=factor(race))) + geom_boxplot(outlier.size=1.5, outlier.shape=21)
library(MASS) # For the data set
ggplot(birthwt, aes(x=factor(race), y=bwt)) + geom_boxplot() + stat_summary(fun.y="mean", geom="point", shape=23, size=3, fill="white")