ggplot2 is a system for declaratively creating graphics based on the Grammar of Graphics. The user provides data, maps variables to aesthetics, and specifies graphical primitives.