x<-commandArgs() type<-x[length(x)-3] ont<-x[length(x)-2] filename<-x[length(x)-1] outfilename<-x[length(x)-0] if (type == "png") { png(outfilename, pointsize = 12); # pointsize is size of text } else { postscript(file=outfilename, width=8,height=8,horizontal=FALSE,pointsize = 12); } d<-read.delim(filename, header = F) plot(x<-d$V1,y<-d$V5,xlab="release date",ylab="total number",main=ont,sub="paths vs terms") lines(x<-d$V1,y<-d$V5,col="blue") lines(x<-d$V1,y<-d$V3,col="red") text(d$V1[length(d$V1)-5],d$V5[length(d$V5)-1],"PATHS") text(d$V1[length(d$V1)-5],d$V3[length(d$V3)-1],"TERMS") pt_ratio=d$V6[length(d$V6)-1] dev.off()