Instead, we will start with Wickham’s paper on ggplot2. This gives us the basic motivation behind the grammar of graphics by covering what a grammar does for us: “A grammar provides a strong foundation for understanding a diverse range of graphics. A grammar may also help guide us on what a well-formed or correct graphic looks like, but there will still be many grammatically correct but nonsensical graphics. This is easy to see by analogy to the English language: good grammar is just the first step in creating a good sentence” (3).
With a language, we have different language components like nouns (which can be subjects, direct objects, or indirect objects), verbs, adjectives, adverbs, etc. We put together combinations of those individual components to form complete sentences and transmit ideas. Our particular word choice and language component usage will affect the likelihood of success in idea transmission, but to an extent, we can work iteratively on a sentence, switching words or adding phrases to get the point across the way we desire.
With graphics, we can do the same thing. Instead of thinking of “a graph” as something which exists in and of itself, we should think of different objects that we combine into its final product: a graph.
I call this first post the poor man’s literature review. The rest of the series is code- and visual-heavy.