library(foreign) DWHouse <- read.dta("C:/house_polarization46_113v9.dta", convert.dates=TRUE, convert.factors=TRUE, missing.type=TRUE, convert.underscore=TRUE, warn.missing.labels=TRUE) plot(repmean1~year, type="p", xlim=c(1900,2012), ylim=c(-1,1), xlab="Year", ylab="Liberal - Conservative", pch=19, col="red", main="House", data=DWHouse, axes=F, xaxs="i", yaxs="i") axis(1, at=seq(1900, 2020, 10)) axis(2, at=seq(-1, 1, 0.5)) box() points(demmean1~year, type="p", pch=19, col="blue", data=DWHouse) text(1960,0.4,labels="GOP mean", col="red") text(1960,-0.4,labels="Dem mean", col="blue")