- x=read.csv("tsplot.csv", header = T)
- x$Date=as.Date(x$Date)
- x$Year=as.numeric(format(x$Date, "%Y"))
- x$Month=as.numeric(format(x$Date, "%m"))
- x$md=as.numeric(format(x$Date, "%m%d"))
- require(reshape2)
- y=melt(x, measure.vars = c("Death", "Temperature"), id.vars = c("Year","Month","md"))
- suppressMessages(require(ggplot2))
- q <- ggplot(y, aes(x=md, y=value, colour=variable))
- q+geom_point() + facet_grid( variable~Year , scales="free_y")+geom_smooth()+labs(x="", y="")+coord_cartesian(xlim=c(101,1231))


雷达卡





京公网安备 11010802022788号







