title: Obtaining Percent Scales Reflective of Individual Facets with ggplot2
body: <p>So I managed to get this far... </p>
  
  <pre><code>ggplot(init, aes(x=factor(ANGLE), fill=NETWORK)) +
  geom_bar(aes(y = (..count..)/sum(..count..))) +
  facet_wrap(~SHOW) + opts(legend.position = "top") +
  scale_y_continuous(labels = percent_format())
  </code></pre>
  
  <p>My problem is that the colored bars below represent the percent of ALL the camera ANGLE measurements for all the television programs in my study.  For instance, the OREILLY graph has a bar that approaches 15% for ANGLE 2, which is %15 for all the ANGLE measurements in the chart, not solely those in the OREILLY facet.  What I want each graph to show is the percentage of counts relative to just ONE television show (just that one facet), rather than all of them.</p>
  
  <p>The idea is to compare the proportional use of camera angles among different shows, but with the way the graph is now, it is skewed to make the shows with more camera angle changes look as though they spend way more time at camera angle 2 than they actually do relative to the others.</p>
  
  <p>The frustrating part of it all is that I spent an hour getting this to look the way I wanted, then I made the mistake of updating R.  The packages updated along with it, and this happened.</p>
  
  <p>A reduced size data table is <a href="http://www.filedropper.com/cmsv07" rel="noreferrer">available here</a>.</p>
  
  <p><strong>EDIT</strong>: This doesn't work either.  I tried putting "group=NETWORK" in either (and both) of the aes(..., ) terms, but nothing changed.  I also tried the same thing with "group=SHOW", which I thought might have more of a chance since I wanted to get just one percentages for one SHOW in each facet (hence, the scales for each facet should go up to about 80% since so many of the shows are predominantly camera angle 2).  Am I missing something?</p>
  
  <pre><code>ggplot(init, aes(x=factor(ANGLE), fill=NETWORK), group=SHOW)
  + geom_bar(aes(y = (..count..)/sum(..count..), group=NETWORK)) +
  + facet_wrap(~SHOW) + opts(legend.position = "top") +
  + scale_y_continuous(labels = percent_format())
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/UrbKm.png" alt="Problematic Graphic"></p>