更改x轴的日期间隔(ggplot2)

时间:2016-03-28 11:08:57

标签: r plot ggplot2

我有两个dataframesDateTimeDateparameterdfs两个列都包含列Date的值相同且列parameter的值不同的列。 dfs都有给定参数的每小时平均值,比如说V1

我想在V1中使用dfsggplot2间隔同时绘制两个5 days的{​​{1}}值。由于所有日期都在轴上,因此情节不可读。 这是我正在使用的代码

x-axis

ggplot() + geom_point(data=df1, aes(Date, V1), color='blue') + geom_point(data=df2, aes(Date, V1), color='red') + theme_bw() + scale_x_date(breaks="10 days", limits= as.Date(c("2012-12-15", "2013-01-15"))) 似乎不起作用。它给出了以下错误

scale_x_date

任何帮助将不胜感激。先感谢您。

0 个答案:

没有答案
相关问题