title: Percentage histogram with facet_wrap
body: <p>I am trying to combine percentage histogram with <code>facet_wrap</code>, but the percentages are not calculated based on group but all data. I would like each histogram to show distribution in a group, not relative to all population. I know it is possible to do several plots and combine them with <code>multiplot</code>.</p>
  
  <pre><code>library(ggplot2)
  library(scales)
  library(dplyr)
  
  set.seed(1)
  df &lt;- data.frame(age = runif(900, min = 10, max = 100),
                   group = rep(c("a", "b", "c", "d", "e", "f", "g", "h", "i"), 100))
  
  tmp &lt;- df %&gt;%
    mutate(group = "ALL")
  
  df &lt;- rbind(df, tmp)
  
  ggplot(df, aes(age)) + 
    geom_histogram(aes(y = (..count..)/sum(..count..)), binwidth = 5) + 
    scale_y_continuous(labels = percent ) + 
    facet_wrap(~ group, ncol = 5) 
  </code></pre>
  
  <p>Output:
  <a href="https://i.stack.imgur.com/QZQsM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QZQsM.png" alt="output plot"></a></p>