x <- read.csv("time.csv", as.is=T, header=F) x <- x[-c(1:10),] x <- x[-c(nrow(x):(nrow(x)-9)),] x$V2 <- x$V2*1000 x$V3 <- x$V3*1000 #png("comb.png", width=450, height=350) plot(c(x$V1, x$V1), c(x$V2, x$V3), type="n", xlab="k", ylab="time (msec)", main="Time to compute nCk (n=10,000)") points(x$V1, x$V2, col="darkblue", type="l", pch=20) points(x$V1, x$V3, col="darkred", type="l", pch=20) legend("topright", legend=c("gmpy", "scipy"), lwd=1, col=c("darkblue", "darkred")) #dev.off() #png("comb-log.png", width=450, height=350) plot(c(x$V1, x$V1), c(x$V2, x$V3), type="n", xlab="k", ylab="time (msec)", main="Time to compute nCk (n=10,000)", log="y") points(x$V1, x$V2, col="darkblue", type="l", pch=20) points(x$V1, x$V3, col="darkred", type="l", pch=20) legend("topright", legend=c("gmpy", "scipy"), lwd=1, col=c("darkblue", "darkred")) #dev.off()