{
# Generate artificial data from a Gaussian distribution
nodes = get.nodes(ocean.demo.grid)
set.seed(1)
x = rnorm(50000, mean(nodes$x), sd(nodes$x))
y = rnorm(50000, mean(nodes$y), sd(nodes$y))
# Plot the density of the mixture
res = (max(nodes$x) - min(nodes$x)) / 50
grd = pdd(ocean.demo.grid, data.frame(x=x, y=y), res=res, sigma=5)
}
Run the code above in your browser using DataLab