title: making a stacked barchart in pandas
body: <p>I would like to create a stacked bar plot from the following dataframe:</p>
  
  <pre><code>   VALUE     COUNT  RECL_LCC  RECL_PI
  0      1  15686114         3        1
  1      2  27537963         1        1
  2      3  23448904         1        2
  3      4   1213184         1        3
  4      5  14185448         3        2
  5      6  13064600         3        3
  6      7  27043180         2        2
  7      8  11732405         2        1
  8      9  14773871         2        3
  </code></pre>
  
  <p>There would be 2 bars in the plot. One for <code>RECL_LCC</code> and other for <code>RECL_PI</code>. There would be 3 sections in each bar corresponding to the unique values in <code>RECL_LCC</code> and <code>RECL_PI</code> i.e 1,2,3 and would sum up the <code>COUNT</code> for each section. So far, I have something like this:</p>
  
  <pre><code>df = df.convert_objects(convert_numeric=True)    
  sub_df = df.groupby(['RECL_LCC','RECL_PI'])['COUNT'].sum().unstack()
  sub_df.plot(kind='bar',stacked=True)
  </code></pre>
  
  <p>However, I get this plot:
  <img src="https://i.stack.imgur.com/wuCQ5.png" alt="enter image description here"></p>
  
  <p>Any idea on how to fix it? I am doing something wrong with the <code>groupby</code>, but not sure of the solution</p>