I'm tried to contour plot a density of multiple normal distribution in R, my code is as follow
set.seed(123)
x<-seq(-20,20,by=0.1)
y<-seq(-20,20,by=0.1)
n=length(x)
zz<-matrix(0,n,n)
for(i in 1:n){
for(j in 1:n){
zz[i,j]=exp(-x[i]^2/10-y[j]^2/5-2*0.3*x[i]*y[j]/(50^0.5))
}
}
contour(x,y,zz,nlevels =10)
My question is that why it the range looks so small, most of the area is blank. I want the contour plot cover wilder area like the range I set for xlim and ylim.


