1. Using attributes
In the last exercises you learned a fundamental concept of ggplot2: aesthetic mappings.
Colloquially, when we say aesthetics we're describing how something looks, but now you know that in ggplot2, we're talking about aesthetic mappings.
If we talk about how something looks, we refer to its attributes. One of the most confusing parts of ggplot2 is that all our visible aesthetics also exist as attributes.
2. Aesthetics? Attributes!
so it's easy to mix up the two!
Attributes are always called in the geom layer (which we'll discuss in more detail in the next chapter).
For example, to change the color of these points to red, we'd just set the plot's attribute using the color argument in the geom layer.
3. Aesthetics? Attributes!
For example, it's color attribute is set by the color argument, its size by the size argument
4. Aesthetics? Attributes!
and its shape by the shape argument.
The distinction between aesthetics and attributes is subtle but important. Mixing the two is a very common mistake.
5. Let's practice!
OK, let's wrap up with some exercises on setting attributes.