library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.5.2
ggplot(diamonds, aes(price, carat, color = color)) +
geom_point()
ggplot(diamonds, aes(carat, price, color = color)) +
geom_point() +
geom_smooth()
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
ggplot(diamonds, aes(cut, price, color = color)) +
geom_boxplot()
You should explore various visualization options, and make/select/present a visualization that you think is most effective.
ggplot(diamonds, aes(price, fill = cut, color = cut)) +
geom_density(na.rm = TRUE)
ggplot(diamonds, aes(carat, fill = cut, color = cut)) +
geom_density(na.rm = TRUE)