title: R Polygon Plot Not Shading to X Axis
body: <p>Using R and polygon I'm trying to shade the area under the line of a plot from the line to the x-axis and I'm not sure what I am doing wrong here.  </p>
  
  <p>The shading is using some point in the middle of the y range to shade from, not 0, the x-axis.</p>
  
  <p>The data set ratioresults is a zoo object but I don't think that's the issue since I tried coercing the y values to as.numeric and as.vector and got the same results. </p>
  
  <p>Code:</p>
  
  <pre><code>plot(index(ratioresults),ratioresults$ratio, type="o", col="red")
  polygon(c(1,index(ratioresults),11),c(0, ratioresults$ratio, 0) , col='red')
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Iyc0k.jpg" alt="enter image description here"></p>