## R: another nifty graph

Make sure to click on the image to see the large version. Code for this graph:

moxbuller = function(n) {
u = runif(n)
v = runif(n)
x = cos(2*pi*u)*sqrt(-2*log(v))
y = sin(2*pi*v)*sqrt(-2*log(u))
r = list(x=x, y=y)
return(r)
}
r = moxbuller(50000)
par(bg="black")
par(mar=c(0,0,0,0))
plot(r$x,r$y, pch=".", col="blue", cex=1.2)

This entry was posted on Thursday, April 8th, 2010 at 12:13 pm and is filed under feature, plot, r.
You can follow any comments to this entry through the RSS 2.0 feed.
You can leave a comment, or trackback from your own site.