如何将ggplot输出保存为pdf格式?

我有以下数据(这是我的数据(包含43天和24 /小时数据)中的10行的头部):

structure(list(Agency.Station.ID = c("MI270N003.6D", "MI270N004.7D", 
"MI270N005.7D", "MI270N007.3D", "MI270N008.5D", "MI270N003.6D", 
"MI270N004.7D", "MI270N005.7D", "MI270N007.3D", "MI270N008.5D"
), Date = structure(c(16526, 16526, 16526, 16526, 16526, 16526, 
16526, 16526, 16526, 16526), class = "Date"), Time = c("00:00:00", 
"00:00:00", "00:00:00", "00:00:00", "00:00:00", "00:05:00", "00:05:00", 
"00:05:00", "00:05:00", "00:05:00"), Speed = c(59, 34, 46, 61, 
46, 58, 39, 51, 36, 52), Precipitation = c(0, 0, 0, 0, 0, 0, 
0, 0, 0, 0)), row.names = c(NA, 10L), class = "data.frame")

我想为每个“ Agency.Station.ID”制作一个pdf文件。 pdf中的每一页都代表一个“日期”。在每个页面中,绘制“时间与速度和降水的关系”。

评论