首页 > 解决方案 > 如何更改/添加标签到条形图填充 + 如何在条形图内部或外部显示数字?

问题描述

relationship_bw_Polattrev_fbse_plot<-ggplot(data = anes_sm, aes(x= polattrev_recoded,  fill=fbse_recoded)) +
  geom_bar(position="dodge") +
  labs(x = 'How often do you pay attention to what’s going on in government and politics?',
       y= 'Frequency',
       title = 'Relationship between attention to politics and government and if sees politics online')+
  theme_bw()
relationship_bw_Polattrev_fbse_plot

我想更改我的标签:fill= variable 另外,如何将数字添加到各个条形?

标签: rggplot2

解决方案


推荐阅读