The grammar of graphics
Textual communication is supported by a set of rules and elements to help us build phrases and express ideas. Grammatical elements such as nouns, verbs, adjectives, prepositions, and others are what make it possible to form sentences, which are used for the purpose of communicating a message. With that in mind, in 1999, Leland Wilkinson wrote the book The Grammar of Graphics, where he made an analogy between the way we write and the way we build graphics. If we think about that for a minute, it makes sense, since both structures – text and graphics – serve the purpose of communicating an idea or a message through data.
The grammar of graphics has these seven elements, which we will go over one by one: data, geometries, aesthetics, statistics, coordinates, facets, and themes. The first three are fundamental, as without those, there would be no graphics.
Data
The data element means the dataset being worked on that is being used to plot a...