[R] Help needed in double bar plot made using ggplot2
bh@r@t_m_@|| @end|ng |rom y@hoo@co@|n
Thu Aug 19 18:52:57 CEST 2021
I have tried to create the following graph using ggplot2 using the following code -
ggplot(aes(x=year, y=percentage, group=gender, fill=gender), data = graph_text)+ geom_bar(position = 'dodge', stat='identity')+ scale_y_continuous(expand = c(0,0))+ theme_classic()+ geom_text(aes(label = percentage), size = 5, position = position_dodge(width = 0.5), vjust=0)
I wanted to ask
1) In the last plot why is the label on top not showing up even when I save the image as a pdf?
2) Is there anyway to make the labels appear in the middle of the bar? It is aligned to the left right now
3) Is there any way to change the colour of the labels on the top of the bars?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 35018 bytes
Desc: not available
More information about the R-help