title: Multiple ggplot pie charts with whole pies
body: <p>I would like to make two side by side pie charts using <code>ggplot2</code> but am having difficulty making both pie charts "whole"
   Here is a sample of my data.</p>
  
  <pre><code>&gt; test
    New York Berlin         group
  1      474    755 Never Visited
  2      214    123  Visited Once
  3       66    122   Visited &gt; 1
  4      142     64       Resided
  </code></pre>
  
  <p>When I try:</p>
  
  <pre><code>  pie &lt;- ggplot(data = melted2, aes(x = "", y = Cnt, fill = Type )) + 
    geom_bar(stat = "identity") +
    geom_text(aes(label = Cnt), position = position_stack(vjust = 0.5)) +
    coord_polar(theta = "y") +
    facet_grid(facets=. ~ City)  +
    theme(
      axis.title.x = element_blank(),
      axis.title.y = element_blank()) + theme(legend.position='bottom') + guides(fill=guide_legend(nrow=2,byrow=TRUE))
  
  pie
  </code></pre>
  
  <p>But this produces: <a href="https://i.stack.imgur.com/y8eHe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/y8eHe.png" alt="enter image description here"></a></p>
  
  <p><b>EDIT:</b> <code>Changing facet_grid(facets=. ~ City)</code> to <code>facet_grid(City ~ ., scales = "free")</code> works but it produces vertically stacked charts like this:</p>
  
  <p><a href="https://i.stack.imgur.com/IuYWt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IuYWt.png" alt="enter image description here"></a></p>
  
  <p>Any suggestions on how to produce two whole pie charts that are horizontal?</p>
  
  <p>Here is the data:</p>
  
  <pre><code>&gt; dput(melted2)
  structure(list(Type = structure(c(1L, 4L, 3L, 2L, 1L, 4L, 3L, 
  2L), .Label = c("Never Visited", "Resided", "Visited &gt; 1", "Visited Once"
  ), class = "factor"), City = structure(c(1L, 1L, 1L, 1L, 2L, 
  2L, 2L, 2L), .Label = c("New York", "Berlin"), class = "factor"), 
      Cnt = c(474L, 214L, 66L, 142L, 755L, 123L, 122L, 64L)), row.names = c(NA, 
  -8L), .Names = c("Type", "City", "Cnt"), class = "data.frame")
  </code></pre>