我想使用 ggplot 在 R 中绘制时间序列数据,但我遇到了这个错误:
Error in continuous_scale(aesthetics, "date", identity, breaks = breaks, :
unused argument(s) (format = "%b-%Y")
句法:
ggplot(p29, aes(dt, ambtemp)) + geom_line() +
scale_x_date(format = "%b-%Y") + xlab("") + ylab("Tempreture")
文件名:p29
ambtemp dt surtemp
1 -1.14 2007-09-29 00:01:57 -2.712
2 -1.12 2007-09-29 00:03:57 -2.775
3 -1.33 2007-09-29 00:05:57 -2.712
4 -1.44 2007-09-29 00:07:57 -2.837
5 -1.54 2007-09-29 00:09:57 -2.775
6 -1.29 2007-09-29 00:11:57 -2.900