Layering is the mechanism by which additional data elements are added to a plot. Each layer can come from a different dataset and have a different aesthetic mapping, allowing us to create plots that could not be generated using qplot(), which permits only a single dataset and a single set of aesthetic mappings.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2009 Springer-Verlag New York
About this chapter
Cite this chapter
Wickham, H. (2009). Build a plot layer by layer. In: ggplot2. Use R. Springer, New York, NY. https://doi.org/10.1007/978-0-387-98141-3_4
Download citation
DOI: https://doi.org/10.1007/978-0-387-98141-3_4
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-0-387-98140-6
Online ISBN: 978-0-387-98141-3
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)