Source

delta-H / doc / clin-2012 / plots.R

pdf('delta-h-alpha-mrr.pdf')# ,height=3.7,width=5)
dat <- read.table('delta-h-alpha-all.csv')[4:16,]
alpha <- dat$V1
mrr <- dat$V2
K <- dat$V3
K.active <- dat$V4
layout(matrix(1:2, ncol = 1))
par(mar=c(1.1, 4.1, 4.1, 2.1))
plot(alpha, mrr, xlab="", ylab="MRR", ylim=c(0,0.5),
     cex.lab=1.2, cex.axis=1.2, type='b', lwd=2, xaxt="n")

#pdf('delta-h-alpha-K.pdf', height=3.7,width=5)
par(mar=c(5.1, 4.1, 1.1, 2.1))
plot(alpha, K/1000, xlab=expression(alpha), ylim=c(0.7,5),
    ylab="K", type='b', lwd=2, col="blue", log="y")
par(new=T)
plot(alpha, K.active/K, ylab="", xlab="", axes=F, type='b', col="red")
axis(4, pretty(c(0.01, 1)))
legend("bottomright",legend=c(expression(K),expression(K[test]/K)),
       fill=c("blue","red"),cex=1.2,bg="white")
dev.off()

pdf('colada-best-mrr-10K.pdf', height=3.7, width=5)
dat <- read.table('colada-best-mrr-all.csv', header=T)
K <- c(50, 200, 800)
plot(K, dat$mrr[dat$pass==1], ylim=c(0.3, 0.45), 
    xlab="K", ylab="MRR",
    type='b', log="x", lwd=2, col="red")
points(K, dat$mrr[dat$pass==20], type='b', lwd=2, col="blue") 
legend("topleft",legend=c(expression(j==20), expression(j==1)),
       fill=c("blue","red"),cex=1.2,bg="white")
dev.off()