Devashri commited on
Commit
ac08a5a
·
verified ·
1 Parent(s): 6712bc3

Update SIR_model.py

Browse files
Files changed (1) hide show
  1. SIR_model.py +1 -1
SIR_model.py CHANGED
@@ -208,7 +208,7 @@ def main(total_population, initial_infected, initial_recovered, beta, gamma, mod
208
  def animate(frame):
209
  ax.clear()
210
  ax.plot(times[:frame+1], s[:frame+1], label='Susceptible', color='blue')
211
- ax.plot(times[:frame+1], infected[:frame+1], label='Infected', color='orange') # Using a different variable name
212
  ax.plot(times[:frame+1], r[:frame+1], label='Recovered', color='green')
213
  ax.xaxis.set_major_locator(plt.MaxNLocator(6))
214
  ax.xaxis.set_major_formatter(plt.FuncFormatter(lambda x, p: '{:.1f}'.format(x)))
 
208
  def animate(frame):
209
  ax.clear()
210
  ax.plot(times[:frame+1], s[:frame+1], label='Susceptible', color='blue')
211
+ ax.plot(times[:frame+1], i[:frame+1], label='Infected', color='orange')
212
  ax.plot(times[:frame+1], r[:frame+1], label='Recovered', color='green')
213
  ax.xaxis.set_major_locator(plt.MaxNLocator(6))
214
  ax.xaxis.set_major_formatter(plt.FuncFormatter(lambda x, p: '{:.1f}'.format(x)))