【发布时间】:2014-01-24 22:42:22
【问题描述】:
我有一个包含多天数据的时间序列。在每一天之间有一个没有数据点的时段。使用ggplot2 绘制时间序列时如何省略这些时间段?
如下图人工示例,如何去掉两个没有数据的时间段?
代码:
Time = Sys.time()+(seq(1,100)*60+c(rep(1,100)*3600*24, rep(2, 100)*3600*24, rep(3, 100)*3600*24))
Value = rnorm(length(Time))
g <- ggplot()
g <- g + geom_line (aes(x=Time, y=Value))
g
【问题讨论】: