#####################################################################################
# Code for the figure in "One Year and Four Elections: A Study of the 1998 Capps    #
# Campaign for California’s 22nd District." In The Battle for Congress: Candidates, #
# Consultants, and Voters. James A.  Thurber (ed.). Spring 2001, Brookings          #
# Institution Press. 								    # 
#                     					  Copyright 2008, Jeff Gill #
#####################################################################################

# FIGURE 1 

ruler <- seq(-5,5,length=500)
x.norm2 <- dnorm(ruler,-2.5,1)
x.norm3 <- dnorm(ruler,2.5,1)
x.norm4 <- (x.norm2 + x.norm3)/2
ps.options(height=5,width=10)
par(mfrow=c(1,1),cex=1,oma=c(2,1,2,1))

plot(ruler,dnorm(ruler,0,2),type="l",ylim=c(-.025,.25),xlim=c(-5,5),
	xlab="",ylab="",xaxt="n",yaxt="n")
lines(ruler,x.norm4,type="l")
lines(ruler,(x.norm4+0.001),type="l")
lines(ruler,(x.norm4+0.0005),type="l")
lines(ruler,(x.norm4+0.0005),type="l")
lines(ruler,(x.norm4+0.0015),type="l")
segments(-5,0,5,0)
text(-3,.23,"Typical",font=13)
segments(-2.55,.2267,-.8,.192)
text(1.8,.24,"22nd",font=13)
segments(1.7505,.231,2.162,.2001)
lines(ruler[200:300],x.norm4[200:300],type="h")
text(-.049,-0.0245,"'True' Moderates")
segments(.1,-.0025,-.22,-.01)

