title: How to label histogram bars with data values or percents in R
body: <p>I'd like to label each bar of a histogram with either the number of counts in that bin or the percent of total counts that are in that bin. I'm sure there must be a way to do this, but I haven't been able to find it. This page has a couple of pictures of SAS histograms that do basically what I'm trying to do (but the site doesn't seem to have R versions): <a href="http://www.ats.ucla.edu/stat/sas/faq/histogram_anno.htm">http://www.ats.ucla.edu/stat/sas/faq/histogram_anno.htm</a> </p>
  
  <p>If possible, it would also be nice to have the flexibility to put the labels above or somewhere inside the bars, as desired. </p>
  
  <p>I'm trying to do this with the base R plotting facilities, but I'd be interested in methods to do this in ggplot2 and lattice as well.</p>