## R-code (September 20, 2007) # draw a multivariate plot of the vote data vote <- read.table("vote.txt") x.1 <- c(1932,1936,1940) x.2 <- c(1960,1964,1968) y.1 <- vote[,2:4] y.2 <- vote[,5:7] summary(vote) plot(x.1, y.1[1,], ylim=c(2,87), xlim=c(1932,1968), lwd=2, type="l") lines(x.2, y.2[1,], lwd=2) for(i in 2:6){ lines(x.1, y.1[i,], lwd=2, col=i) lines(x.2, y.2[i,], lwd=2, col=i) } pos <- locator() legend(pos$x, pos$y, legend=vote[,1], text.col=1:6)