Skip to content
Graphviz (DOT) templates

SIR Compartmental Model

Susceptible → Infectious → Recovered flow with rates.

Template previewGraphviz (DOT)
Rendering…

Make it your own.

digraph sir {
  rankdir=LR;
  graph [bgcolor=transparent];
  node [shape=circle, style=filled, fontname=Inter, fontsize=12];

  S [label="S", fillcolor="#dcfce7"];
  I [label="I", fillcolor="#fee2e2"];
  R [label="R", fillcolor="#dbeafe"];

  S -> I [label="β·SI/N"];
  I -> R [label="γ·I"];
}