In [22]:
x <- seq(0, 8, by=0.1)
y1 <- dnorm(x, mean=3, sd=1)
y2 <- dnorm(x, mean=3.5, sd=1)
plot(x,y1, xlab="x", ylab="Nornal Distribution", cex.axis=1.5, cex.lab=1.5, type="l", col="steelblue", lwd=7)
lines(x, y2, lwd=6, col=rgb(0.7, 0.3, 0.3, 0.7))
legend(x=6, y=0.3, cex=1.5, box.col="white", box.lwd=0,
col=c("steelblue", rgb(0.7, 0.3, 0.3, 0.7)),
lwd=7, legend=c(expression(y[1]), expression(y[2])))
In [ ]: