title: How do I create a bar chart in python ggplot?
body: <p>I'm using yhat's <a href="https://github.com/yhat/ggplot/" rel="noreferrer">ggplot library</a>. I have the following pandas DataFrame:</p>
  
  <pre><code>   degree  observed  percent observed  expected  percent expected
  0       0         0               0.0         0          0.044551
  1       1         1               0.1         1          0.138604
  2       2         3               0.3         2          0.215607
  3       3         4               0.4         2          0.223592
  4       4         1               0.1         2          0.173905
  5       5         1               0.1         1          0.108208
  </code></pre>
  
  <p>At the moment, I'm doing the following (where <code>df</code> returned in the first line in the first line in the function is the DataFrame above):</p>
  
  <pre><code>def chartObservedExpected(graph):
      df = observedExpected(graph)
      return ggplot(aes(x='degree', y='percent observed'), data=df) + \
             geom_point() + \
             ylim(-0.015,1.015) + \
             xlim(-0.05,max(df['degree']) + 0.25) + \
             labs("Degree","Proportion of Total") + \
             ggtitle("Observed Node Degree Distribution")
  
  chartObservedExpected(G)
  </code></pre>
  
  <p>This is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/8kpSY.png" alt="scatter"></p>
  
  <p>However, whenever I try <code>geom_bar()</code> instead of <code>geom_point()</code>, I end up with just 100% bars. I've tried just plain <code>geom_bar()</code> and also <code>geom_bar(stat="percent observed")</code>, but neither seem to work. This is always what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/IegNc.png" alt="bar"></p>
  
  <p>What I'm trying to do is to mimic/reproduce the following:</p>
  
  <p><img src="https://i.stack.imgur.com/zaQvM.png" alt="attempt"></p>
  
  <p>Any idea how to get the bar part working (or the whole thing, for that matter)?</p>