title: Is there a way to show overlapping histograms in R without adjusting transparency?
body: <p>The objective is to show overlapping histograms, but I want to avoid using the alpha adjustment so that the colours remain bright.</p>
  
  <p>Is there a way to do this without adjusting the alpha arg?</p>
  
  <p><strong>Goal is to display the colors shown below:</strong></p>
  
  <pre><code>hist(rnorm(mean=10, n = 1000), col='blue')
  hist(rnorm(mean=11, n = 1000), col='red', add=T)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/KEHE4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KEHE4.png" alt="enter image description here"></a> </p>
  
  <p><strong>But also show the overlapping area as shown here</strong></p>
  
  <pre><code>hist(rnorm(mean=10, n = 1000), col='blue')
  hist(rnorm(mean=11, n = 1000), col=rgb(1,0,0,0.5), add=T)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tJpVG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tJpVG.png" alt="enter image description here"></a></p>
  
  <p>Similar question that doesn't quite address transparency:</p>
  
  <p><a href="https://stackoverflow.com/questions/16449576/how-to-create-black-and-white-transparent-overlapping-histograms-using-ggplot2">How to create black and white transparent overlapping histograms using ggplot2?</a></p>
  
  <p>I'd be fine with densities and use of other graphing packages (e.g. lattice, ggplot2, etc).</p>
  
  <p><strong>Edit:</strong> I'd like the plots to be filled and the intersecting area to be a different color (e.g. purple where red and blue intersect).</p>