inst/examples/insects-boxplot2.R

# ggplot2 绘制昆虫数目箱线图
data(InsectSprays)
library(ggplot2)
p = ggplot(aes(y = count, x = spray), data = InsectSprays) +
  geom_boxplot(outlier.shape = 4) +
  labs(x = "杀虫剂", y = "频数") +
  coord_flip()
print(p)

Try the MSG package in your browser

Any scripts or data that you put into this service are public.

MSG documentation built on July 22, 2021, 1:06 a.m.