title: Normalizing faceted histograms separately in ggplot2
body: <p>My questions is similar to
  <a href="https://stackoverflow.com/questions/11766856/normalizing-y-axis-in-histograms-in-r-ggplot-to-proportion">Normalizing y-axis in histograms in R ggplot to proportion</a>
  but I'd like to add to it a bit.</p>
  
  <p>In general, I have 6 histograms in a 2x3 facet design, and I'd like to normalize each of them separately. I'll try to make a sample data set here to give an idea:</p>
  
  <pre><code>hvalues=c(3,1,3,2,2,5,1,1,12,1,4,3)
  season=c("fall","fall","fall","fall","winter","winter","winter","winter","summer","summer","summer","summer")
  year=c("year 1","year 1","year 2","year 2","year 1","year 1","year 2","year 2","year 1","year 1","year 2","year 2")
  group=c("fall year 1","fall year 1","fall year 2","fall year 2","winter year 1","winter year 1","winter year 2","winter year 2","summer year 1","summer year 1","summer year 2","summer year 2")
  all=data.frame(hvalues,season,year)
  </code></pre>
  
  <p>Using</p>
  
  <pre><code>ggplot(all, aes(x=hvalues,group=group)) + 
  geom_histogram(aes(y=..count../sum(..count..))) + 
  facet_grid(season ~ year)
  </code></pre>
  
  <p>gives the proportions overall (i.e. combining all the facets). I'd like each group facet to be normalized to 1. hvalues are not integers in my actual data - they are numerical.</p>
  
  <p>I am a novice using R, and would really appreciate some help. Thanks in advance!</p>