我可以将geom_jitter
这些频率作为多个点吗?
head(GOL_F_WriteCounter, 10)
Var1 Freq
1 2014-10-20 44
2 2014-10-21 64
3 2014-10-22 43
4 2014-10-23 32
5 2014-10-24 24
6 2014-10-25 18
7 2014-10-26 26
8 2014-10-27 31
9 2014-10-28 45
10 2014-10-29 30
我的代码:
ggplot(GOL_F_WriteCounter, aes(x= Var1, y= Freq))+
geom_jitter()+ scale_x_date()`
答案 0 :(得分:2)
这样的事情怎么样?
d <- GOL_F_WriteCounter[
unlist(Map(rep, 1:nrow(GOL_F_WriteCounter), GOL_F_WriteCounter$Freq)), ]
d$y <- unlist(lapply(GOL_F_WriteCounter$Freq, seq))
ggplot(d, aes(x = Var1, y = y)) + geom_jitter() + scale_x_date()