# NOT RUN {
x = runif(100,min=0,max=2)
y = runif(100,min=0,max=1)
g = griddata2(x,y,xlim=c(0,2),ylim=c(0,1),n=c(20,10))
image(g$xbreak,g$ybreak,g$n,asp=1,col=grey.colors(100,0,1))
points(x,y,col='red',pch=20,cex=0.5)
# }
Run the code above in your browser using DataLab