set.seed(1000) x<-seq(0,5,length.out=1000) y<-df(x,1,1,0) plot(x,y,col="red",xlim=c(0,5),ylim=c(0,1),type='l', xaxs="i", yaxs="i",ylab='density',xlab='', main="The F Cumulative Distribution Function") lines(x,pf(x,1,1,2),col="green") lines(x,pf(x,2,2,2),col="blue") lines(x,pf(x,2,4,4),col="orange") legend("topright",legend=paste("df1=",c(1,1,2,2),"df2=",c(1,1,2,4)," ncp=", c(0,2,2,4)), lwd=1, col=c("red", "green","blue","orange"))