dta <- read.table("birth_college.txt",header = T)
head(dta)
##   Birth Entrance
## 1  23.0       NA
## 2  22.1       NA
## 3  20.6       NA
## 4  19.6       NA
## 5  18.0       NA
## 6  15.9       NA
dta$Year <- 1981:2009
dta$College <- dta$Entrance-40
tail(dta)
##    Birth Entrance Year College
## 24   9.6       87 2004      47
## 25   9.1       89 2005      49
## 26   9.0       91 2006      51
## 27   8.9       96 2007      56
## 28   8.6       97 2008      57
## 29   8.3       97 2009      57
library(ggplot2)
ggplot(dta)+
  geom_point(data=dta, aes(x=Year, y=Birth),pch=1)  +
  scale_x_continuous(name="Year",  breaks=seq(1980, 2010, 5))+
  scale_y_continuous(name= "Birth rate(0.1%)", limits=c(0, 60), breaks=seq(0, 60, 10), 
sec.axis=sec_axis(~.+40, breaks = seq(40, 100, 10), name="Acceptance rate(%)")) +
  geom_point(data=dta, aes(x=Year, y= College),pch=19) +
  guides(fill=T)
## Warning: Removed 13 rows containing missing values (geom_point).