I have a grouped bar chart similar to this one
I would like to add the count of each group e.g. number of actors in smaller text below the "Actor" label in X-axis. I am not able to put the count of each group.
Following is what I have so far
data <- read.csv("employee.txt", sep = "\t" , header = TRUE)
df1<-tibble(data)
df1<- mutate(df1, emp_class = cut(emp_type))
df1<- mutate(df1, emp_class = cut(LPA_CN, breaks = seq(10, 80, by = 20)))
my_ggp <- ggplot(df1, aes(x=as.factor(Employee), fill=as.factor(emp_class)))+geom_bar(aes( y=..count../tapply(..count.., ..x.. ,sum)[..x..]*100), position="dodge") + ylab('% of total') +xlab("") + labs(fill = "Types")
my_ggp + theme(text = element_text(size = 20))
I would appreciate any help.