0

/* I need to add the total numbers of each column in my graph. */

 base %>%
  group_by(Produto) %>%
  count(Produto) %>%
  ungroup() %>% 
  mutate(Produto = reorder(Produto, n)) 
  ggplot(., aes(x = Produto, y = n, fill = Produto)) +
  theme(axis.text.x = element_text(angle = 70)) +
  theme(legend.key.size = unit(1, 'mm')) +
  coord_flip()  +
  geom_col() + 
  ggtitle("Venda anual de Cerveja 2021/2022") +
  ylab("count")
Lu w
  • 1
  • 1

0 Answers0