import matplotlib.pyplot as plt
import re
data = [re.split('\s+', line)[:-1] for line in file('rabbit.log')]

for i in range(len(data)):
    data.insert(i*2, range(len(data[0])))

plt.plot(*data)
plt.yscale('log')
plt.xlabel('generatie')
plt.ylabel('populatie')
plt.grid(True)
plt.savefig('rabbit.pdf')
