dta<- read.table("birth_college.txt", h=T)
##嘗試一只有一軸
library(ggplot2)
ggplot(dta, aes(Year,Birth))+
geom_line() +
geom_point() +
theme_minimal()##嘗試二加入兩個geom_line,是成功的
ggplot() +
geom_line(data=dta, aes(Year,Birth)) +
geom_line(data=dta, aes(Year,Entrance),
linetype="dotted") +
geom_point(data=dta,
aes(Year, Birth),
pch=16) +
geom_point(data=dta,
aes(Year, Entrance),
pch=1) +
labs(x="Year",
y="Birth") +
theme_minimal()