SIR Animation Example --------------------- :download:`Downloadable Source Code ` The code below produces an animation of an SIR epidemic: .. raw:: html You may need to install additional software for this to work and modify `extra_args` appropriately. The commands below work on a mac with ffmpeg installed. The commands below also show an alternate way to specify the position of nodes passing `pos` through `fast_SIR` to be used when generating the simulation_investigation object. :: import networkx as nx import EoN import matplotlib.pyplot as plt G = nx.grid_2d_graph(100,100) #each node is (u,v) where 0<=u,v<=99 #we'll initially infect those near the middle initial_infections = [(u,v) for (u,v) in G if 45