Skip to content
Plotly templates

Medicine — Plot: SIR Epidemic

Susceptible, infected and recovered over time.

Template previewPlotly
Rendering…

Make it your own.

{
  "data": [
    {"type":"scatter","mode":"lines","name":"Susceptible","line":{"color":"#2563eb","width":3},
     "x":[0,10,20,30,40,50,60,70,80],"y":[990,900,650,300,120,60,40,35,33]},
    {"type":"scatter","mode":"lines","name":"Infected","line":{"color":"#dc2626","width":3},
     "x":[0,10,20,30,40,50,60,70,80],"y":[10,90,300,400,250,100,40,15,7]},
    {"type":"scatter","mode":"lines","name":"Recovered","line":{"color":"#16a34a","width":3},
     "x":[0,10,20,30,40,50,60,70,80],"y":[0,10,50,300,630,840,920,950,960]}
  ],
  "layout": {"title":"SIR epidemic model","xaxis":{"title":"time (days)"},"yaxis":{"title":"number of people"}}
}