\begin{Schunk}
\begin{Sinput}
 xvals <- seq(0, 10, length.out = 1000)
 gam1 <- dgamma(xvals, shape = 1, scale = 1)
 gam2 <- dgamma(xvals, shape = 2, scale = 1)
 plot(xvals, gam1, type = "l", xlab = "x", ylab = "Gamma probability density", 
      ylim = c(0, 1))
 lines(xvals, gam2, lty = 2)
 text(0.4, 0.7, "shape=1, scale=1", pos = 4, col = 1)
 text(3, 0.2, "shape=2, scale=1", pos = 4, col = 1)
\end{Sinput}
\end{Schunk}
