问题描述
如何避免切掉我的曲线(绿线)?
x <- Phoenix_August_clean$Sum.Precipitation.Total.August
curve(dnorm(x,mean = fit.gaussian2$estimate[1],sd = fit.gaussian2$estimate[2]),lwd=3,col="red",add=TRUE)
curve(dgamma(x,fit.gamma.mme$estimate[1],fit.gamma.mle$estimate[2]),col="orange",add=TRUE) #Maximum likelihood
curve(dgamma(x,fit.gamma.mme$estimate[2]),col="green",add=TRUE) #Method of moments
legend("topright",legend=c("normal","Gamma - ML","Gamma - MM"),col=c("red","orange","green"),lty=1,lwd=1)
结果: