Agenda


In this module, we will learn to

  • modify the appearance of all non data components of the plot such as
    • axis
    • legend
    • panel
    • plot area
    • background
    • margin
    • facets
  • use different themes

Libraries


library(ggplot2)
library(dplyr)
library(tidyr)

Scatter Plot


p <- ggplot(mtcars) +
  geom_point(aes(disp, mpg))
p

Axis Title


p + theme(axis.title.x = element_text(color = "red", size = 10))