In [63]:
import pandas as pd
from pandas import *
import matplotlib.pyplot as plt
%matplotlib inline
from ggplot import *
from numpy import random 
plt.style.use('ggplot')


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-63-46c354c85d91> in <module>()
      5 from ggplot import *
      6 from numpy import random
----> 7 plt.style.use('ggplot')
      8 

AttributeError: 'module' object has no attribute 'style'

In [44]:
data = pd.read_csv("./annotated/fig4_table.csv", header=None)
data.columns = ['A','B','C','D','E']

In [59]:
data=data.drop('B',axis=1)
table = pivot_table(data, index=['A'], columns=['E'])
table


Out[59]:
C
E No Sampling One-term Two-term
A
-2676499.387000 88 94 89
-2639204.495699 16 16 97
-2605097.638018 16 16 97
-2602803.781000 61 60 61
-2601829.570443 16 16 97
-2601594.728666 16 16 97
-2601313.228467 16 16 97
-2600891.787168 16 16 97
-2600834.749000 61 59 61
-2599726.211974 16 16 97
-2598851.666000 61 61 61
-2598572.819000 61 61 61
-2598508.186000 61 60 61
-2598498.457000 61 60 61
-2598487.073000 61 61 61
-2598424.272000 61 60 61
-2598423.780000 61 61 61
-2598386.660000 61 60 61
-2595844.069090 16 16 97
-2592702.947982 16 16 97

In [62]:
pd.options.display.mpl_style = 'default' 
table.plot(kind='bar',  colors=['r', 'g', 'b'])


Out[62]:
<matplotlib.axes.AxesSubplot at 0x9d92c04c>
/home/april/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py:1236: UserWarning: findfont: Font family ['monospace'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))

In [ ]: