In [ ]:
# load the packages we need
import pandas as pd
import pygal
import numpy as np

In [ ]:
# load the appropriate csv file with the simulation data
zFrame=pd.read_csv('nCounts.csv');
# extract the relevant parameters
n=zFrame.nT[0];
pZombie=zFrame.pZ[0];
pInfection=zFrame.pI[0];

In [ ]:
xy_chart = pygal.XY()
xy_chart.title = str('SIZ model (n = ' + str(n) + '; pZombie = ' + str(pZombie) + '; pInfection = ' + str(pInfection) + ')')
xy_chart.x_title='Time (frames)'
xy_chart.y_title='Number of subjects'
xy_chart.add('Susceptible',  list(zip(zFrame.nFrame,zFrame.nS)))
xy_chart.add('Infected',  list(zip(zFrame.nFrame,zFrame.nI)))
xy_chart.add('Zombie',  list(zip(zFrame.nFrame,zFrame.nZ)))
xy_chart.render_to_file('zombies.svg')

In [ ]:


In [ ]:


In [ ]: