ChristopherLucas / MatchingFrontier

Optimal pruning for imbalance minimization in causal inference
18 stars 8 forks source link

Change plotting to base R plotting functions #10

Closed ChristopherLucas closed 10 years ago

ChristopherLucas commented 10 years ago

par(mar=c(4,5,1,1)) xlab="Number of Observations Pruned" ylab="First Difference of the probability of\nconflict for treated vs. control" plot(0,0,ylim=c(0,.08),axes=F,xlab=xlab,ylab=ylab,type="n") axis(1,col="gray30",col.axis="gray30",las=1,tck = -0.015) axis(2,col="gray30",col.axis="gray30",las=1,tck = -0.015) polygon(x=c(-1000,-1000,5000,5000),y=c(-1000,1000,1000,-1000),col="gray90",border=NA) pp <- par()

make ggplot style lines

ss <- axTicks(1) abline(v=ss,col="white") midss <- sapply((1:(length(ss)-1)),function(i){mean(c(ss[i+1],ss[i]))}) abline(v=midss,col="#ffffff50") ss <- axTicks(2) abline(h=ss,col="white") midss <- sapply((1:(length(ss)-1)),function(i){mean(c(ss[i+1],ss[i]))}) abline(h=midss,col="#ffffff50")