Evolutionary dynamics of stochastic SIR model and IBM where only direct transmission is involved. The top panels show the dynamics of the infectious individuals (summing all the strains through time). The middle panels show the evolutionary dynamics. Y-axis represents the strain "identity", X-axis is time and colors illustrate the superposed evolutionary dynamics of the 500 stochastic realizations. Each point in this panel is the maximal incidence over all these replicates for the strain identity described on Y-axis at the time step given on X-axis. The bottom panels show the dynamics of strain diversity. The left and right parts show the outputs of our IBM and SIR model respectively.