x = seq(-3, 3, len=200)
plot(x, erf(x), type="l", col="red", las=1, lwd=2,
main="red is erf(x), blue is pnorm(x)")
abline(v=0, h=0, lty="dashed", col="black")
lines(x, pnorm(x), col="blue", lty="dotted", lwd=2)
Run the code above in your browser using DataLab