R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

library(ggplot2)
data <- mpg
ggplot(data) +
 aes(x = displ, y = hwy, size = class) +
 geom_point(shape = "circle", colour = "#112446") +
 theme_minimal()
## Warning: Using size for a discrete variable is not advised.

ggplot(data) +
 aes(x = displ, y = hwy) +
 geom_point(shape = "circle", size = 1.5, colour = "#112446") +
 theme_minimal() +
 facet_grid(vars(drv), vars(cyl))

ggplot(data) +
 aes(x = displ, y = hwy, fill = drv, colour = drv, shape = drv, group = drv) +
 geom_point(size = 1.5) +
 geom_smooth(span = 0.75) +
 scale_fill_hue(direction = 1) +
 scale_color_hue(direction = 1) +
 theme_minimal()
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

ggplot(diamonds) +
 aes(x = cut, fill = clarity) +
 geom_bar(position = "dodge") +
 theme_minimal() +
 theme(legend.position = "none")