1
我在同一個圖中有一條線和一個條形圖。但是,條形圖位於線圖的前面。我怎樣才能將線路圖發送到前端?將線圖繪製到條形圖前
h<-hist(loose_All, breaks="FD", plot=FALSE)
xfit<-seq(min(loose_All),max(loose_All),length=100)
x.norm<-rnorm(n=100000, mean=mapply("[", results[1], 1),
sd=mapply("[", results[1], 2))
yfit<-dnorm(xfit,mean=mean(x.norm),sd=sd(x.norm))
yfit <- yfit*max(h$counts)/max(yfit)
plot(xfit*1.1, yfit*1.1, col="blue", lwd=2, type="l", xlab="Looseness",
main="Normal pdf and histogram",)
plot(h, add=TRUE, col="grey",freq=TRUE)
由於
較短:'線(數據,功能)' –