I'm trying to do all pairwise scatterplots of a single variable using ggplot2. Something similar to the default pairs(), but I'd like to manipulate the faceting and coloring with ggplot2. here is a failing example of my current attempt in ggplot2
iris_melt = melt(iris)
ggplot(iris_melt, aes(value,value)) + geom_point() + facet_wrap(variable~variable)
What I would like is a plot of:
- Sepal.Length vs Sepal.Width
- Sepal.Length vs Petal.Length
- etc.
I know ggpairs from GGally would do the trick in this situation, however I'd like to do custom faceting and I don't see why I'd need to 'unmelt' the data instead of keeping it tidy