title: stat_contour not able to generate contour lines
body: <p>I need to add lines via <code>stat_contour()</code> to my <code>ggplot</code>/<code>ggplot2</code>-plot. Unfortunately, I can not give you the real data from which point values should be evaluated. However, another easily repreducably example behaves the same:</p>
  <pre><code>testPts &lt;- data.frame(x=rep(seq(7.08, 7.14, by=0.005), 200))
  testPts$y &lt;- runif(length(testPts$x), 50.93, 50.96)
  testPts$z &lt;- sin(testPts$y * 500)
  
  ggplot(data=testPts, aes(x=x, y=y, z=z)) + geom_point(aes(colour=z))
         + stat_contour()
  </code></pre>
  <p>This results in the following error message:</p>
  <blockquote>
  <p>Error in if (nrow(layer_data) == 0) return() : argument is of length
  zero In addition: Warning message: Not possible to generate contour
  data</p>
  </blockquote>
  <p>The example looks not different from others posted on stackoverflow or in the official manual/tutorial to me, and it seemingly doesn't matter if I provide more specifications to <code>stat_contour</code>. It seems the function does not pass the data(-layer) as pointed ou tint the error message.</p>