title: How to plot a Stacked and grouped bar chart in ggplot?
body: <p>I have a data frame like below:</p>
  
  <pre><code>id    month     type    count
  ___  _______   ______   ______
  1      1          1       10
  1      1          2       09
  1      1          3       26
  1      2          1       60
  1      2          2       90
  2      2          3       80
  2      1          1       10
  2      1          2       09
  2      1          3       26
  2      2          1       60
  2      2          2       90
  2      2          3       80
  3      1          1       10
  3      1          2       09
  3      1          3       26
  3      2          1       60
  3      2          2       90
  3      2          3       80
  </code></pre>
  
  <p>I thought the best way to visualize is a stacked group bar something like the below:
  <a href="https://i.stack.imgur.com/WaPZs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WaPZs.png" alt="Stacked and Grouped Bar Chart"></a></p>
  
  <p>So I tried with </p>
  
  <pre><code>ggplot(df,aes(x=id,y=count,fill=month))+geom_bar(stat="identity",position=position_dodge())+geom_text(aes(label=count),size=3)
  </code></pre>
  
  <p>Which gave a plot which was a bit different than my expectation.Any help is appreciated.</p>