title: Overlay plots in R
body: <p>I want to plot 3 barplots together in one graph based on values from different columns of a data frame. </p>
  
  <p>It should look <a href="http://www.beckmancoulter.com/ucm/idc/groups/public/documents/webasset/glb_bci_003540.jpg" rel="nofollow">something like this</a>.</p>
  
  <p>The y-values of plot 1 are the sum of the y-values of plot 2 and 3. The color of plot 1 and 2 can be fully filled (e.g. blue &amp; red), but the color of plot 3 has to be translucent. </p>
  
  <p>I was able to make a plot for each column separately using the <code>barplot()</code> function, but I was not able to combine them in one graph.</p>
  
  <pre><code>barplot(covpatient[[1]]$cov, names.arg = covpatient[[1]]$exon, xlab = covpatient[[1]]$gene[1] , ylab = "read depth" , border = "blue", col = "blue")
  barplot(covpatient[[1]]$plus, names.arg = covpatient[[1]]$exon, xlab = covpatient[[1]]$gene[1] , ylab = "read depth" , border = "red", col = "red")
  barplot(covpatient[[1]]$min, names.arg = covpatient[[1]]$exon, xlab = covpatient[[1]]$gene[1] , ylab = "read depth" , border = "gray", col = "gray")
  </code></pre>
  
  <p>Could someone give me a hand?</p>