title: Pyramid plot in R
body: <p>For an example dataset, I create a pyramid plot by country showing levels (%) of overweight males and females in a population.</p>
  
  <pre><code>library(plotrix)
  xy.males.overweight&lt;-c(23.2,33.5,43.6,33.6,43.5,43.5,43.9,33.7,53.9,43.5,43.2,42.8,22.2,51.8,
            41.5,31.3,60.7,50.4)
      xx.females.overweight&lt;-c(13.2,9.4,13.5,13.5,13.5,23.7,8,3.18,3.9,3.16,23.2,22.5,22,12.7,12.5,
                12.3,10,0.8)
      agelabels&lt;-c("uk","scotland","france","ireland","germany","sweden","norway",
                       "iceland","portugal","austria","switzerland","australia","new zealand","dubai","south africa",
                       "finland","italy","morocco")
  
      par(mar=pyramid.plot(xy.males.overweight,xx.females.overweight,labels=agelabels,
                                   gap=9))
  </code></pre>
  
  <p>I found this approach using 'plotrix' here:
  <a href="https://stats.stackexchange.com/questions/2455/how-to-make-age-pyramid-like-plot-in-r">https://stats.stackexchange.com/questions/2455/how-to-make-age-pyramid-like-plot-in-r</a></p>
  
  <p>I wish to create a slightly more detailed pyramid plot, with the addition of a stacked bar chart on both sides showing overweight AND percentage obese for males and females (preferably in different shades of red/blue).  Example data values for 'obese' are listed below:</p>
  
  <pre><code>xx.females.obese&lt;-c(23.2,33.5,43.6,33.6,43.5,23.5,33.9,33.7,23.9,43.5,18.2,22.8,22.2,31.8,
                         25.5,25.3,31.7,28.4)
  xy.males.obese&lt;-c(13.2,9.4,13.5,13.5,13.5,23.7,8,3.18,3.9,3.16,23.2,22.5,22,12.7,12.5,
                    12.3,10,0.8)
  </code></pre>
  
  <p>Also, if 'Age' on the graph could be changed (to country), that would be helpful to.</p>
  
  <p>Many thanks in advance for any help/advice.  I am open to using plotrix or ggplot2 as appropriate.</p>