Plotting multivariate data using ggplot
The ggplot2
library has a host of plotting tools for multivariate data. You will use the ggpairs()
function to produce richer plots similar to the pairs()
plot. This plot can be adapted to provide different information in the upper and lower triangles and diagonal entries of the matrix of plots. By default, it provides the scatter plots in the lower triangle, densities in the diagonal entries, and correlation in the upper triangle of the matrix of plots.
This exercise is part of the course
Multivariate Probability Distributions in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Produce a matrix of plots for the first four variables
wine.gg <- ___
wine.gg