In [131]:
import matplotlib.pyplot as plt;plt.rcdefaults()
import numpy as np
In [132]:
semester = ('2008-2', '2009-1', '2009-2', '2010-1', '2010-2', '2011-1', '2011-2', '2012-1', '2012-2', '2013-1')
y_pos = np.arange(len(semester))
rate = (66, 89, 100, 100, 61, 79, 94, 87, 92, 56)
In [133]:
plt.barh(y_pos, rate, align='center', alpha=0.4)
plt.yticks(y_pos, semester)
plt.xlabel('%')
plt.title('Dynamics Approval Rate')
Out[133]:
In [134]:
plt.annotate('n = 29', xy=(.3, .16), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 9', xy=(.29, .25), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 34', xy=(.3, .33), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 23', xy=(.3, .42), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 33', xy=(.3, .5), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 52', xy=(.3, .58), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 69', xy=(.3, .66), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 77', xy=(.3, .75), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 83', xy=(.3, .83), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n = 79', xy=(.3, .91), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
plt.annotate('n is class size', xy=(.5, .07), xycoords='axes fraction',
horizontalalignment='center', verticalalignment='center')
Out[134]:
In [135]:
plt.show()
In [135]: