I am trying to create contour plots, e.g. https://i.stack.imgur.com/C31CQ.png
I created some data for this example:
#generate data
a <- rnorm(100,10,10)
b <- rnorm(100,5,5)
c <- rnorm(100,1,1)
d - data.frame(a,b,c)
d = as.matrix(d)
Then, I tried to run the code to make the contour plots:
image(d)
contour(d, add = TRUE)
However, the resulting plot (left) looks quite different from the expected plot (right):
Does anyone know why these two graphs look so different?
Thanks