Advanced aesthetic mapping

In ggplot2, you have already seen how important the role played by aesthetic mapping is. You have the possibility of applying a very sophisticated and personalized scheme of aesthetic mapping in order to represent data or calculate statistical transformations based on the value of a variable used as a flagging factor. In the following sections, we will go through the different options of aesthetic mapping available and how they can be combined in your plot. For most of the examples, we will simply create small datasets by simulating random variables since, for the time being, we are just looking at the different mapping options for the data.

Typical aesthetic mappings available in ggplot2

You have already seen that the ...

Get ggplot2 Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.