can anyone tell me how to adjust the x label position?
I want to put the label(df1$Value) on each bar's head?
Thanks for your help!
Here is my code
Yr <- c("2016","2017","2016","2017","2016","2017")
Type <- c("A","A","B","B","C","C")
Value <- c(73,183,160,476,11,73)
p1Data <- data.frame(Yr,Type,Value)
p1Data$Yr <- as.character(p1Data$Yr)
p1Data <- transform(p1Data, Type = factor(p1Data$Type, levels = c("A","B","C")))
library(ggplot2)
p1 <- ggplot(p1Data,aes(Type,Value,fill=Yr))+geom_bar(stat="identity",position='dodge')+ theme(axis.title.x=element_blank())+ geom_text(aes(label=Value,vjust=1.5))