title: How to plot Bayesian prior and posterior distributions in one panel using R?
body: <p>I've tried several approaches, including <code>qqmath</code>, <code>lattice</code> <code>densityplot()</code> and a number of panel functions like <code>panel.mathdensity</code> and <code>panel.densityplot</code>. However, I couldn't get them to do what I want them to do. </p>
  
  <p>An internet search on this topic produces results which focus either on base plots in R or don't draw both distributions in one panel. I could use R base graphics, however, I also want to plot several distribution pairs and one panel for each pair.</p>
  
  <p>The books "RGraphics" and "Lattice: Multivariate Data Visualization with R" couldn't enlighten me in this area either.</p>
  
  <p>The data usually looks something like this:</p>
  
  <pre><code>data &lt;- dgamma(seq(from=0.00001,to=0.01,by=0.00001),shape = .1, scale = .01)
  </code></pre>
  
  <p>I'm open to either <code>lattice</code> or <code>ggplot</code> package, although I have more experience using <code>lattice</code>.</p>
  
  <p>Please let me know if you need any more information to help me out here.</p>