Book Image

ggplot2 Essentials

By : Donato Teutonico
Book Image

ggplot2 Essentials

By: Donato Teutonico

Overview of this book

Table of Contents (14 chapters)
ggplot2 Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we had a look at a few examples of more advanced plots that can be realized with ggplot2. We went through the inclusion of statistics in the plot by showing examples for the smooth and linear regression. We then covered examples of more complex mapping of aesthetic variables, for instance, by recalling the variables that are created from the statistical transformations and how to use them to create histograms with shades of colors that are related to the count or density of the data. We then also saw a few examples of how annotations can be added to plots. Finally, we saw a few examples of how to realize a polar area chart using the polar coordinates. In the next chapter, we will look at how to control plot detail using ggplot2 and explore axis scales, legends, and themes in detail.