I tried this for plotting out some chi-square distributions with various df and it seemed to work out:
s<-seq(0,25,.01) plot(s,dchisq(s,2),type="l",lwd=2,col="dodgerblue4") lines(s,dchisq(s,5),type="l",lwd=2,col="green1") lines(s,dchisq(s,10),type="l",lwd=2,col="orange1")
This should look something like this:
Here’s something similar for a normal distribution (notice that I use slightly different code for plotting the curves):
n=15 curve(dnorm(x,mean=0,sd=1/sqrt(n)),-5,5,xlab="x", ylab="Density",lwd=4,col="dodgerblue4") n=5 curve(dnorm(x,mean=0,sd=1/sqrt(n)),-5,5,xlab="x", ylab="Density",lwd=4,col="green1",add=T) n=1 curve(dnorm(x,mean=0,sd=1/sqrt(n)),-5,5,xlab="x", ylab="Density",lwd=4,col="orange1",add=T)
This should end up looking like this:

