[R] function used to smooth the scatter plot and generate a density map

hong honglinzhou at 163.com
Tue Oct 10 02:48:46 CEST 2006


Dear R-helpers,

I want to smooth a scatter plot (or 2d histogram) to generate the density
map using a squared Euclidean kernel function, with each data point
contributing a density of 1/(r*r + k) to each cell on the heatmap, where
r*r was the squared Euclidean distance between the coordinates of the cell
and the coordinates of the point, and k was a constant smoothing factor.
There is figure to demonstrate the process in the attachment.

I don’t know if there function in some package can do this. I have used many
keywords to search the R help files and the R project web but did not get
the answer. Can anybody help me? Thank very much.

Sincerely
 Honglin zhou
 
College of Life Sciences
Beijing Normal University
Beijing, 100875
P. R. China



More information about the R-help mailing list