Please consider the below normal distribution curves with different mean values and standard deviation.
Tried to regenerate them in ggplot but couldnt because x axis needs to be fixed always.
How can we plot all the below (preferably their area in different colors) in the same figure ?
similar question:
x <- seq(0, 2*m_, length=1000)
y <- dnorm(x, mean= m_, sd= std_)
plot(x, y, type="l", lwd=1)
x1 <- seq(1, 4*m_, length=1000)
y1 <- dnorm(x1, mean= 2*m_, sd= 2*std_)
plot(x1, y1, type="l", lwd=1)
x2 <- seq(1, 6*m_, length=1000)
y2 <- dnorm(x2, mean= 3*m_, sd= 3*std_)
plot(x2, y2, type="l", lwd=1)
# Tried but this overshoots to outer axis
plot(x1, dnorm(x1,2*m_,2*std_), type="l")
lines(x, dnorm(x,m_,std_), col="red")