2012-08-22 104 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

较短:'线(数据,功能)' –