03-stat_summary_boxplot.Rmd
Last updated: 2024-03-25
# Load ggplot2
library(ggplot2)
# Load ggmitji
library(ggmitji)
# Load patchwork (to put plots together)
library(patchwork)
p1 <- ggplot(mpg, aes(class, hwy)) + geom_boxplot() + labs(title = "Made with geom_boxplot")
p2 <- ggplot(mpg, aes(class, hwy)) + stat_boxplot() + labs(title = "Made with stat_boxplot")
p3 <- ggplot(mpg, aes(class, hwy)) + stat_summary_boxplot() + labs(title = "Made with stat_summry_boxplot")
(p1 + p2) / p3