title: geom_histogram using proportions rather than counts
body: <p>I have a data frame of length measurements for two species of fish across multiple years. This output of <code>dput</code> can be accessed at the link here</p>
  
  <p><a href="https://drive.google.com/file/d/0BzArRBVtzxttdUtaZWVoNUwzTFU/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/0BzArRBVtzxttdUtaZWVoNUwzTFU/view?usp=sharing</a></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Due to the issue of accessing data below, I have added another link to the csv file. Hopefully this resolves the issue</p>
  
  <p><a href="https://drive.google.com/open?id=0BzArRBVtzxttZ2RlcDNKdUFERk0" rel="nofollow noreferrer">https://drive.google.com/open?id=0BzArRBVtzxttZ2RlcDNKdUFERk0</a></p>
  
  <p><strong>END EDIT</strong></p>
  
  <p>I have then created histograms of length frequency for each species and year. If the data is read in as <code>fish_data</code> then the following code will be reproducible</p>
  
  <p><code>library(dplyr)
  library(ggglot2)
  library(scales)</code></p>
  
  <p><code>colour_data &lt;- filter(fish_data, Length &gt;= 50 &amp; Length &lt;= 100)</code></p>
  
  <p><code>ggplot(fish_data, aes(x = Length)) +
      geom_histogram(breaks = seq(0, 700, by = 50), colour = "black") +
      geom_histogram(data = colour_data, breaks = seq(0, 700, by = 50), fill = "red") +
      scale_x_continuous(breaks = pretty_breaks(n=15)) +
      facet_grid(Year~Species) +
      theme_grey() +
      labs(y = "Frequency caught\n", x = "\nLength (cm)") +
      theme(axis.text.x = element_text(angle = 45, hjust = 1))</code></p>
  
  <p>However I now need to display the y-axis as a proportion rather than total count. So for instance, the height of each 50cm bin for each facet should be plotted as a proportion of the total number of fish. The total count for each facet would then add up to 100. </p>
  
  <p>I'm having trouble conceptualizing how to do this new graph. I guess I'd need to manipulate the original data frame but I'm unsure how this would look. </p>