[R] Overlaying 2D kernel density plots on scatterplot matrix

Michael Hopkins michael.hopkins at hopkins-research.com
Sat Jun 24 11:47:09 CEST 2006

Hi all

We are pretty new to R here and trying to achieve something that we believe
is possible but it¹s not easy to work out how to do it.

We are producing scatterplot matrices for e.g. 10 variables.  What we would
like to do is superimpose 2D kernel density estimators on top of each plot
so that we end up with a scatterplot matrix of 2D kernel density (contour)

The kernel density plots don¹t have to be very sophisticated i.e. default
settings and greyscale are fine ­ we can work on details later.  What has
stumped us so far is how you Œattach¹ the kernel density results to the
scatterplot results and then overlay them.

Any ideas, links or code gratefully received.

TIA and please CC answers here if possible


More information about the R-help mailing list