Reputation: 21
How can I make the captions not overlap?
mayors <- read.csv("https://raw.githubusercontent.com/umbertomig/intro-prob-stat-FGV/master/datasets/brmayors.csv")
ggplot(mayors, aes(DESCRICAO_GRAU_INSTRUCAO)) + geom_bar()
'''
Upvotes: 1
Views: 41
Reputation: 3660
You could rotate the labels (here to 45, but you can pick) with theme
library(ggplot2)
ggplot(mayors, aes(DESCRICAO_GRAU_INSTRUCAO)) + geom_bar() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
Upvotes: 1