I have a data set formed by a 9 points observed in a combination of 2 variables with 3 values each, i.e.
x <- c(0,10,100)
y <- c(0,25,30)
z <- matrix(c(1,2,3,4,5,6,7,8,9), nrow = 3, ncol = 3, byrow = TRUE)
With this data I created a contour plot
filled.contour(x,y,z)
Separately, I created the scatter plot from the points where the data was colected
A <- matrix(c(0,0,0,10,10,10,100,100,100), nrow = 3, ncol = 3) #As x
B <- matrix(c(0,0,0,25,25,25,30,30,30), nrow = 3, ncol = 3, byrow = TRUE) #As y
plot(A,B)
However, when I try to put them together, it doesn't works pretty well. Anyone can help me? How can I put correctly the scatter plot over the contour plot?
x <- c(0,10,100)
y <- c(0,25,30)
z <- matrix(c(1,2,3,4,5,6,7,8,9), nrow = 3, ncol = 3, byrow = TRUE)
A <- matrix(c(0,0,0,10,10,10,100,100,100), nrow = 3, ncol = 3) #As x
B <- matrix(c(0,0,0,25,25,25,30,30,30), nrow = 3, ncol = 3, byrow = TRUE) #As y
filled.contour(x,y,z)
points(A,B)