4.11 Aesthetic Attributes: Color, Size, Shape (1)

  • colour, size and shape: Additional aesthetics that can be specified in aes(...)
  • Ggplot2 takes care of mapping data to aesthetic scale
    • 1 scale for each aesthetic mapping
  • Scale creates a guide (axis or legend) for reading/decoding
    • Decoding = Convert aesthetic values to data values
    • Default scales vs. manual scales (…we’ll see later)
  • Setting an aesthetic to fixed value is done outside of aes(...). Compare…
    • ggplot(economics, aes(date, unemploy)) + geom_point(aes(colour ="blue"))
    • ggplot(economics, aes(date, unemploy)) + geom_point(colour ="blue")