【发布时间】:2016-06-08 16:55:48
【问题描述】:
我在使用堆积条形图时遇到问题,它要在时间轴上表示。
我的 DF 如下所示:
date (class: Date) | action (class: character) | share (class: integer)
2016-01-17 | ABC | 0.26
2016-01-17 | DEF | 0.16
...
2016-01-18 | ABC | 0.22
2016-01-18 | GHI | 0.19
我现在想要的是每天的堆积条形图。我试过了
ggplot(my_df, aes(date,fill=action))+
geom_bar()+
scale_x_date()
但是,这不会产生预期的结果。有人有想法吗?
最好的祝福
【问题讨论】: