2012-08-22 6 views
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) 

덕분

답변

0

사용 : 파 (새 = TRUE) 플롯 (데이터, 기능 축 = FALSE, xlab = ""ylab = "")

+1

짧은'라인 (데이터, 함수)' –

관련 문제