Back
Is it possible to plot a matrix of scatter plots with ggplot2, using ggplot's nice features like mapping additional factors to color, shape etc. and adding smoother?
I am thinking about something similar to the base function pairs.
To create a matrix of scatterplots, you can use the ggpairs() function from the GGally package as follows:
install.packages("GGally")library(GGally)data(iris)ggpairs(iris[,1:3])
install.packages("GGally")
library(GGally)
data(iris)
ggpairs(iris[,1:3])
Output:
31k questions
32.8k answers
501 comments
693 users