[R] graphing help: line runs off top of graph
Faheem Mitha
faheem at email.unc.edu
Wed Feb 3 18:53:10 CET 2010
Hi,
See the files at
http://bulldog.duhs.duke.edu/~faheem/R/
Usage is
$ Rscript memgraph.R meminfo.csv
Output is meminfo.pdf. As you can see, one of the lines (blue) runs off
the top of the graph. Can anyone suggest a way to avoid this happening?
Please CC me on any reply. Thanks in advance.
Regards, Faheem.
************************************************************************
memgraph.R
************************************************************************
args <- commandArgs()
filename = args[6]
m = read.csv(filename, header=TRUE)
m = data.frame(scale(m, center=FALSE, scale = c(60, 1024^2, 1024^2, 1)))
mRSS = m[,c("time", "RSS")]
mVSZ = m[,c("time", "VSZ")]
mPERCENT = m[,c("time", "X.MEM")]
pdf(file=paste(strsplit(filename, "\\.")[[1]][1],".pdf", sep=""))
plot(mRSS, col="red", type='l', xlab="time (min)", ylab="memory (GB)")
lines(mVSZ, col="royalblue", type='l')
#plot(mPERCENT)
dev.off()
More information about the R-help
mailing list