我有两组时间序列数据。我想把它们放在一个情节中。我使用了以下代码:
temp <- data.frame(HMn29_29$avg_val, HMn28_29$avg_val, HMn29_29$h)
ggplot(temp, aes(HMn29_29.h)) + ylim(-2, 13) +
geom_line(aes(y = HMn28_29.avg_val, colour = "Tempratur")) +
geom_line(aes(y = HMn29_29.avg_val, colour = "TempratureA")) +
opts(title = 'chart_title')
我想HMn29_29$avg_val
在情节中分配 +.6 和 -.6 的容差。
的样本数据HMn29_29
:
h avg_val
1 2007-09-29 00:00:00 -1.3250000
2 2007-09-29 01:00:00 -0.4670000
3 2007-09-29 02:00:00 -0.4426667
4 2007-09-29 03:00:00 -0.6396667
5 2007-09-29 04:00:00 -0.7843333
6 2007-09-29 05:00:00 -0.5563333
7 2007-09-29 06:00:00 -0.7276667
8 2007-09-29 07:00:00 -0.6260000
9 2007-09-29 08:00:00 -0.7290000
10 2007-09-29 09:00:00 0.4976667
的样本数据HMn28_29
:
h avg_val
1 2007-09-29 00:00:00 -1.9225000
2 2007-09-29 01:00:00 -1.6676667
3 2007-09-29 02:00:00 -1.5820000
4 2007-09-29 03:00:00 -1.5716667
5 2007-09-29 04:00:00 -1.8290000
6 2007-09-29 05:00:00 -1.6153333
7 2007-09-29 06:00:00 -1.8093333
8 2007-09-29 07:00:00 -1.9303333
9 2007-09-29 08:00:00 -1.3980000
10 2007-09-29 09:00:00 1.2270000
有什么建议吗?