title: Extract data from a ggplot
body: <p>I have made a plot using  <code>ggplot2</code> <code>geom_histogram</code> from a data frame. See sample below and link to the ggplot histogram <a href="https://stackoverflow.com/questions/25350094/need-to-label-each-geom-vline-with-the-factors-using-a-nested-ddply-function-and">Need to label each geom_vline with the factors using a nested ddply function and facet wrap</a> </p>
  
  <p>I now need to make a data frame that contains the summarized data used to generate the ggplot above.</p>
  
  <pre><code>Sector2 Family  Year    Length
  BUN Acroporidae 2010    332.1300496
  BUN Poritidae   2011    141.1467966
  BUN Acroporidae 2012    127.479
  BUN Acroporidae 2013    142.5940556
  MUR Faviidae    2010    304.0405
  MUR Faviidae    2011    423.152
  MUR Pocilloporidae  2012    576.0295
  MUR Poritidae   2013    123.8936667
  NTH Faviidae    2010    60.494
  NTH Faviidae    2011    27.427
  NTH Pocilloporidae  2012    270.475
  NTH Poritidae   2013    363.4635
  </code></pre>