I've produced this graph (on the attached photo) using ggplot2.
My code goes like this:
ggplot(data, aes(fill=condition, y=value, x=period)) +
geom_bar(position="fill", stat="identity")+
xlab("Période") + ylab("Pourcentage") +
ggtitle("Répartition des français et étrangers")+
scale_y_continuous(labels = scales::percent)+
scale_fill_brewer(palette = "OrRd")
I just need to display the values on the bars. However, adding geom_text is not straightforward. I would appreciate it if you could provide some ideas.