This post explains how to build a scatterplot matrix with base R, without any packages. It provides several reproducible examples with explanation and R code.
plot()
function
For a set of data variables (dimensions) X1, X2, ??? , Xk, the scatter plot matrix shows all the pairwise scatterplots of the variables on a single view with multiple scatterplots in a matrix format.
The native plot()
function does the job pretty well as
long as you just need to display scatterplots. For more option,
check the correlogram section
👋 After crafting hundreds of R charts over 12 years, I've distilled my top 10 tips and tricks. Receive them via email! One insight per day for the next 10 days! 🔥