| 1 |
#!/usr/bin/env python |
| 2 |
import numpy.numarray as na |
| 3 |
|
| 4 |
from pylab import * |
| 5 |
|
| 6 |
labels = ["Baseline", "System"] |
| 7 |
data = [3.75 , 4.75] |
| 8 |
error = [0.3497 , 0.3108] |
| 9 |
|
| 10 |
xlocations = na.array(range(len(data)))+0.5 |
| 11 |
width = 0.5 |
| 12 |
# bar chart with hollow bars: |
| 13 |
bar(xlocations, data, yerr=error, width=width, edgecolor='k', facecolor='none') |
| 14 |
yticks(range(0, 8)) |
| 15 |
xticks(xlocations+ width/2, labels) |
| 16 |
xlim(0, xlocations[-1]+width*2) |
| 17 |
title("Average Ratings on the Training Set") |
| 18 |
gca().get_xaxis().tick_bottom() |
| 19 |
gca().get_yaxis().tick_left() |
| 20 |
|
| 21 |
show() |