ggplot2

library(ggplot2)

Boxplot

ToothGrowth$dose <- as.factor(ToothGrowth$dose)


ggplot(ToothGrowth,
       aes(x = dose, y = len, fill = dose)) + 
geom_boxplot() +
guides(fill = "none")

ggplot(ToothGrowth,
       aes(x = dose, y = len, col = dose)) + 
geom_boxplot() + 
coord_flip()