I have these stacked bar charts and the labels are touching, causing it to be difficult to differentiate. I would prefer if I was able to separate them a bit, as the information is important to present clearly!
Here is my code:
ggplot(data =GraphData, aes(x = factor(Year), y = value, fill = variable)) +
geom_bar(position = "fill", stat = 'identity') +
geom_col(position = position_stack(), color = "black")+
geom_text(data = GraphPercent, aes(y = GraphData$value, label = paste0(percent(value),"(", GraphData$value, ")")),
position = position_stack(vjust = 0.5), size = 3.5, col = c("black"))+
scale_fill_grey(start = 0.6, end = 1)+
theme(panel.background = element_blank(),axis.line = element_line(colour = "black"),)+
xlab("Year") +
ylab("Cases")
Thanks a lot I really appreciate it.