1
如何将日期添加到x轴而不是十进制数?将时间序列图的x轴格式化为日期
dates<-seq(from=as.Date("2000/7/1"), by="month", length.out=18)
y<-rnorm(18,20,3)
myts<-ts(data=y,
start=c(as.numeric(format(min(dates),"%Y")),
as.numeric(format(min(dates),"%m"))),
frequency=12,
deltat=1/12)
plot(myts,ylab='Y',xlab='Date',type='l')
感谢&亲切的问候
类似问题[本](http://stackoverflow.com/questions/9178223/dates-appearing-as-decimals-in-r-plot)? –