\begin{Schunk}
\begin{Sinput}
 x <- seq(0.1, 10, by = 0.01)
 xprob <- dchisq(x, df = 1)
 plot(x, xprob, type = "l")
 xprob2 <- dchisq(x, df = 2)
 lines(x, xprob2, lty = 2, col = 2, lwd = 2)
 xprob3 <- dchisq(x, df = 3)
 lines(x, xprob3, lty = 3, col = 3, lwd = 2)
 xprob4 <- dchisq(x, df = 4)
 lines(x, xprob4, lty = 4, col = 4, lwd = 2)
 legend("topright", legend = c("df = 1", "df = 2", "df = 3", "df = 10"), 
         lty = 1:4, col = 1:4)
\end{Sinput}
\end{Schunk}
