Remove all of x axis labels in ggplot [duplicate] Remove all of x axis labels in ggplot [duplicate] r r

Remove all of x axis labels in ggplot [duplicate]


You have to set to element_blank() in theme() elements you need to remove

ggplot(data = diamonds, mapping = aes(x = clarity)) + geom_bar(aes(fill = cut))+  theme(axis.title.x=element_blank(),        axis.text.x=element_blank(),        axis.ticks.x=element_blank())