4
I would like to know how to remove these letters a
that appear in the bar chart caption in ggplot in R. I want you to have the bar values the same way it appears in the image, but when I run the code, these a
appear automatically in the caption.
Code:
CS = data.frame(
Setores = factor(c("Comércio","Comércio","Serviços","Serviços")),
Situação = factor(c("Admitidos","Desligados","Admitidos","Desligados"),
levels=c("Admitidos","Desligados")),
Quantidade = c(2604, -1766, 6826, -5331)
)
ggplot(data=CS, aes(x=Situação, y=Quantidade, fill=Setores)) +
geom_bar(aes(fill = Setores), stat="identity", position="dodge") +
geom_label(aes(label =round(Quantidade,0), group = Setores),
colour = "black", position = position_dodge(width=1))
Thank you very much!!
– Letícia Marrara
It’s great to know that my response has helped you in some way. So consider vote and accept the answer, so that in the future other people who experience the same problem have a reference to solve it.
– Marcus Nunes