library(ggplot2)
ggplot(tips, aes(x = day, y = tip)) +
geom_boxplot()
ggplot(tips, aes(x = tip, fill = factor(week))) +
geom_density(alpha = 0.5) +
labs(x = "Tip", y = "Density", fill = "Week")
ggplot(tips, aes(x = tip)) +
geom_dotplot()
ggplot(tips, aes(x = tip, fill = factor(day))) +
geom_density(alpha = 0.5) +
labs(x = "Tip", y = "Density", fill = "Day")
Run the code above in your browser using DataLab