19 Advanced graphs
This chapter covers
- Customizing
ggplot2
graphs - Adding annotations
- Combining multiple graphs into a single plot
- Creating interactive graphs
There are many ways to create a graph in R. We’ve focused on the use of ggplot2
because of its coherent grammar, flexibility, and comprehensiveness. The ggplot2
package was introduced in chapter 4, with coverage of geoms, scales, facets, and titles. In chapter 6, we created bar charts, pie charts, tree maps, histograms, kernel density plots, box and violin plots, and dot plots. Chapters 8 and 9 covered graphics for regression and ANOVA models. Chapter 11 discussed scatter plots, scatter plot matrices, bubble plots, line charts, corrgrams, and mosaic charts. Other chapters have covered ...
Get R in Action, Third Edition 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.