Plot: Density Maps

I found these maps useful for quickly graphing correlation matrixes. As well as for other tasks outside of the classroom such as eye tracking density maps.

...


 * 1) xcor and ycor are vectors that combine to create the set of  coordinates for all the datapoints

library(MASS)

dens <- kde2d(xcor, ycor)

filled.contour(dens)

...