Scatterplot matrix with GGally

A scatterplot matrix is a series of scatterplots organized in a grid and often used to describe the relationship between different variables. These plots can range over different degrees of complexity, from merely plotting correlations between variables up to histograms and kernel density plots of distributions that incorporate other variable metadata . If you are already familiar with the graphics package, the pairs() function can be used to generate a basic scatterplot matrix. Alternatively, the GGally package, a helper package of ggplot2, can be used to generate scatterplot matrices and other, more complex matrix figures in the ggplot2 style. It contains templates for different plots to be combined into a plot ...

Get ggplot2 Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.