Grammar of Graphics in R
Learn about the structured approach followed in the ggplot2 package with the grammar of graphics to build visualizations.
We'll cover the following...
What is the grammar of graphics?
First, let’s think about what a graphic is. How do we describe a graphic concisely, and can we build a representation of the description? The answers to these questions can help us understand the concepts involved in the grammar of graphics.
If we look at any graphic, we are likely to find a mapping of certain variables from the dataset to their visual representation in the graphic. The variables or data properties are typically numerical or categorical and are mapped visually as points (x and y coordinates), line colors, different markers, heights of bars, etc.
We know that the grammar for a language is a set of rules describing the correct and acceptable ...