title: How to add overlapping histograms with lattice
body: <p>Using the data in this question <a href="https://stackoverflow.com/questions/21663108/coloring-points-on-a-lattice-plot-in-r">https://stackoverflow.com/questions/21663108/coloring-points-on-a-lattice-plot-in-r</a> I want to use the <code>histogram</code> function in <code>lattice</code> to plot the three histograms on the same plot but separately so that I can control the colors and allow for a semi-transparent color where the histograms overlap.</p>
  
  <p>However, the following code doesn't work:</p>
  
  <pre><code>histogram(locs[locs.col=="darkblue"] , breaks=20, xlim=c(25,150),col="darkblue" )
  histogram(locs[locs.col=="yellow"] , breeaks=20, xlim=c(25,150),col="yellow",add=T ) # add doesn't work here
  histogram(locsy[locs.col=="red"] , breaks=20, xlim=c(25,150),col="red",add=T )
  </code></pre>
  
  <p>because the histograms won't be added to eachother. I know this works for the <code>hist</code> function in base packages so here are my questions:</p>
  
  <p>1) Is there a way of adding histograms to the plot with <code>histogram</code>?
  2) How can I make the bins of the histograms to be the same width for each instance of a histogram 
  3) How can I make the colors semi-transparent for where the histograms overlap?
  4) How can I rotate the histogram 90 degrees so that it frequency is the horizontal axis?</p>