
在条形图中,值显示为incorrectly.How以更正错误。
ggplot(data=df, aes(x=Demand_Supply,fill=time_slot),position = 'stack') +
geom_bar() + facet_wrap(~`Pickup.point`) +
geom_text(stat='count',aes(label=abs(..count..)))发布于 2017-10-08 15:09:11
你可以使用vjust和hjust来控制它。
尝试以下操作:
ggplot(data=df, aes(x=Demand_Supply,fill=time_slot),position = 'stack')+ geom_bar() + facet_wrap(~Pickup.point)+
geom_text(stat='count',aes(label=abs(..count..)), , vjust = -0.5)您可以尝试使用hjust和vjust进行不同的排列和组合。
https://stackoverflow.com/questions/46628349
复制相似问题