I am using the following code to create a standard normal distribution in R:
x <- seq(-4, 4, length=200) y <- dnorm(x, mean=0, sd=1) plot(x, y, type=\"
Using the code in this answer, you could skip creating x and just use curve() on the dnorm function:
x
curve()
dnorm
curve(dnorm, -3.5, 3.5, lwd=2, axes = FALSE, xlab = "", ylab = "") axis(1, at = -3:3, labels = c("-3s", "-2s", "-1s", "mean", "1s", "2s", "3s"))
But this doesn't use the given code anymore.