Update SIR_model.py
Browse files- 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],
|
| 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)))
|