[R] Scatterplot Showing All Points

bogdan romocea br44114 at gmail.com
Tue Dec 18 19:21:55 CET 2007


Another approach which I'm pleased with but was not suggested so far
is jitter + kde2d from MASS:

plot(jitter(x), jitter(y))
if (!exists("kde2d")) require(MASS)
kdesamp <- 20000  #depending on your RAM
forkde <- if (kdesamp < length(x)) sample(1:length(x), kdesamp,
replace=FALSE) else 1:length(x)
d <- kde2d(x[forkde], y[forkde])
contour(d, add=TRUE)



> -----Original Message-----
> From: r-help-bounces at r-project.org
> Subject: Re: [R] Scatterplot Showing All Points
>



More information about the R-help mailing list