def extract_data(filename):
    infile = open(filename, 'r')    
    infile.readline() # skip the first line
    numbers = []
    for line in infile:
        words = line.split()
        number = float(words[1])
        numbers.append(number)
    infile.close()
    return numbers

values = extract_data('rainfall.dat')
# from scitools.std import plot
import matplotlib.pyplot as plt
month_indices = range(1, 13)
plt.plot(month_indices, values[:-1], 'o2')



