0

I try to get a contour plot out of this.

x <- seq(-250,250, by=0.005)
y <- seq(-250,250, by=0.005)
p_x <- 450+2.5*10^(-4)*(x^2+y^2)
p_y <- 450+2.5*10^(-4)*(x^2+y^2)
z <- outer(x, y, function(x, y) 0*x + 0*y)


contour(p_x,p_y,z)

But it's still not working. I get the error >increasing 'x' and 'y' values expected<. What may be important: z has to be a matrix made out of zeros.

Frosi
  • 177
  • 5
  • 12
  • @ZheyuanLi I updated the question - I tried the given function in [link](http://stackoverflow.com/questions/5847042/how-to-draw-a-contour-plot-when-data-are-not-on-a-regular-grid) but it did not work. – Frosi Oct 24 '16 at 08:10
  • It worked!!!!!!! Thank you so much! :-) – Frosi Oct 24 '16 at 08:42

0 Answers0