Skip to main content

Build a plot layer by layer

  • Chapter
  • First Online:
ggplot2

Part of the book series: Use R ((USE R))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hadley Wickham .

Rights and permissions

Reprints 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

Publish with us

Policies and ethics