import matplotlib.pyplot as plt
import re
data = [re.split('\s+', line)[:-1] for line in file('rabbit_grow.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('groei van populatie')
plt.grid(True)
plt.savefig('rabbit_grow.pdf')
