title: shading area between two lines in r
body: <p>For example if i need to shade two area in plot</p>
  
  <pre><code>x&lt;-rep(1:10)
  plot(x,type="h")
  </code></pre>
  
  <p>I need as an example shade the area from 1 to 3 and from 7 to 10,</p>
  
  <p>I use this commands but it omitted the lines of plot.</p>
  
  <pre><code>usr &lt;- par('usr')
  rect(1, usr[3], 3, usr[4], col='green')
  </code></pre>