# How to plot contour plots of R0 against two parameters?

I am working on an epidemiological model and I would like to know how to plot contour plots of R0 (basic reproduction number) against two given parameters using Mathematica. An example contour plot is given below.

The values of the parameters (except beta and gamma) of my model and the formula for R0 are given below.

c = 0.01
theta = 0.2778
p = 0.05
phi = 0.95
epsilon = 0.084
delta = 0.011
mu = 0.000027

R0 = (epsilon*c*beta*theta*(mu+(1-phi)*p))/(mu*(mu+p)*(mu+epsilon)*(mu+gamma+delta))


I wish to draw the contour plot of R0 against the two parameters beta and gamma which could both vary between 0 and 1. Any help would be greatly appreciated. Thanks a lot in advance!

• Try: ContourPlot[R0, {gamma, 0, 1}, {beta, 0, 1}] Commented Dec 31, 2022 at 17:05

Clear["Global*"]

c = 0.01;
theta = 0.2778;
p = 0.05;
phi = 0.95;
epsilon = 0.084;
delta = 0.011;
mu = 0.000027;

R0 = (epsilon*c*beta*
theta*(mu + (1 - phi)*p))/(mu*(mu + p)*(mu + epsilon)*(mu +
gamma + delta));

ContourPlot[R0, {beta, 0, 1}, {gamma, 0, 1},
FrameLabel -> (Style[#, 14] & /@ {β, γ}),
PlotLegends -> BarLegend[Automatic,
LegendLabel -> Placed[HoldForm[R0], Bottom]]]
`

Compared with the example shown in the question, R0 has much larger values.