使用ggplot绘制按位置,平均推荐人和年龄组划分的累积百分比

时间:2019-02-08 23:27:37

标签: r ggplot2

尝试按位置和平均推荐链接创建堆积的条形图

ggplot(data=data, mapping=aes(x=location)) +
  geom_bar(mapping=aes(y=average_utiliz),
           stat="identity", position="identity", 
           fill=qicblue, color=qicblue) +
  geom_bar(mapping=aes(y=average_referrals), 
           stat="identity", position="identity",
           fill = NA, color=qicorange) +
  scale_x_discrete(limits=sitestoplot2) +
  xlab(NULL) + 
  ylab("Avg. referrals/Utilization") + 
  theme_bw() + 
  theme(axis.ticks.x=element_blank(),
        panel.grid=element_blank())

类似于下图,因为我希望包括总体内容:

enter image description here

但是我希望它更像这样:

enter image description here

0 个答案:

没有答案
相关问题