scatterplotMatrix with group histograms
It's pretty easy to build a nice huge scatterplot matrix with histograms down the diagonal for multivariate data as follows: scatterplotMatrix(somedata[1:points.count,],groups=somedata[1:points.count,class], by.groups=TRUE,diagonal="histogram") According to the documentation though, it doesn't seem possible to divide up the histogram by the group labels as is done in this question . How would you do that using scatterplotMatrix or a similar function? Is this what you had in mind? Using the iris dataset: library(ggplot2) library(data.table) library(reshape2) # for melt(...) library(plyr) # for