I am trying to generate a scatterplot matrix with density plots in the diagonals (using ggplot, preferably). The documentation for ggpairs
in the GGally package sta
So I finally figured this out, by studying a different question here. It turns out that unless axisLabels
is set to "show"
, density plots on the diagonal are suppressed, without warning.
xx <- mtcars[,c(1,3,4,6)] ## extract mpg, disp, hp, and wt from mtcars
library(GGally)
ggpairs(xx, diag=list(continuous="density"), axisLabels='show')
Produces this, as expected: